Skip to content

Commit b4719f6

Browse files
committed
Minor work for #4907: reduce _annotation_ introspection of JDK types further
1 parent 0e9db3d commit b4719f6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedClassResolver.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public class AnnotatedClassResolver
5858

5959
// Also... JDK types do not have annotations that are of interest to us
6060
// At least JDK container types
61-
_collectAnnotations = (_intr != null) &&
62-
(!ClassUtil.isJDKClass(_class) || !_type.isContainerType());
61+
// 25-Jan-2025, tatu: [databind#4907] not just Container types, all JDK types
62+
_collectAnnotations = (_intr != null) && !ClassUtil.isJDKClass(_class);
6363
}
6464

6565
AnnotatedClassResolver(MapperConfig<?> config, Class<?> cls, MixInResolver r) {
@@ -77,7 +77,7 @@ public class AnnotatedClassResolver
7777
_primaryMixin = (r == null) ? null : r.findMixInClassFor(_class);
7878
}
7979

80-
_collectAnnotations = (_intr != null);
80+
_collectAnnotations = (_intr != null) && !ClassUtil.isJDKClass(_class);
8181
}
8282

8383
public static AnnotatedClass resolve(MapperConfig<?> config, JavaType forType,
@@ -145,7 +145,6 @@ AnnotatedClass resolveFully() {
145145
resolveClassAnnotations(superTypes),
146146
_bindings, _intr, _mixInResolver, _config.getTypeFactory(),
147147
_collectAnnotations);
148-
149148
}
150149

151150
AnnotatedClass resolveWithoutSuperTypes() {

0 commit comments

Comments
 (0)