You are right, but a slightly modified comparator is needed by getSortedDeclaredFields(Class<?> clazz). See #45266b9.