Skip to content

Commit

Permalink
Merge branch '2.19'
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Oct 22, 2024
2 parents d6c261d + 8c76995 commit 8a585c7
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,22 @@ private static void _introspect(Class<?> currType, Map<String, PropBuilder> prop
// then public fields (since 2.8); may or may not be ultimately included
// but at this point still possible
for (Field f : currType.getDeclaredFields()) {
if (fieldNameMap != null) {
fieldNameMap.put(f.getName(), f);
}
if (!Modifier.isPublic(f.getModifiers()) || f.isEnumConstant() || f.isSynthetic()) {
// First things first: skip synthetics, Enum constants
if (f.isEnumConstant() || f.isSynthetic()) {
continue;
}
// Only include static members if (a) inclusion feature enabled and
// (b) not final (cannot deserialize final fields)
if (Modifier.isStatic(f.getModifiers()) && (noStatics || Modifier.isFinal(f.getModifiers()))) {
continue;
}
_propFrom(props, f.getName()).withField(f);
// But for possible renaming, even non-public Fields have effect so:
if (fieldNameMap != null) {
fieldNameMap.put(f.getName(), f);
}
if (Modifier.isPublic(f.getModifiers())) {
_propFrom(props, f.getName()).withField(f);
}
}

// then get methods from within this class
Expand Down

0 comments on commit 8a585c7

Please sign in to comment.