diff --git a/src/main/java/tools/jackson/databind/introspect/POJOPropertiesCollector.java b/src/main/java/tools/jackson/databind/introspect/POJOPropertiesCollector.java index cb4ee5bcb7..076bc1b982 100644 --- a/src/main/java/tools/jackson/databind/introspect/POJOPropertiesCollector.java +++ b/src/main/java/tools/jackson/databind/introspect/POJOPropertiesCollector.java @@ -384,20 +384,15 @@ protected void collectAll() // First: gather basic accessors LinkedHashMap props = new LinkedHashMap(); - // 15-Jan-2023, tatu: [databind#3736] Let's avoid detecting fields of Records - // altogether (unless we find a good reason to detect them) - // 17-Apr-2023: Need Records' fields for serialization for cases - // like [databind#3628], [databind#3895] and [databind#3992] - // 22-Jul-2024, tatu: ... and for deserialization sometimes too [databind#4626] + // 14-Nov-2024, tatu: Previously skipped checking fields for Records; with 2.18+ won't + // (see [databind#3628], [databind#3895], [databind#3992], [databind#4626]) _addFields(props); // note: populates _fieldRenameMappings _addMethods(props); // 25-Jan-2016, tatu: Avoid introspecting (constructor-)creators for non-static // inner classes, see [databind#1502] - // 13-May-2023, PJ: Need to avoid adding creators for Records when serializing [databind#3925] - // 18-May-2024, tatu: Serialization side does, however, require access to renaming - // etc (see f.ex [databind#4452]) so let's not skip - if (!_classDef.isNonStaticInnerClass()) { // && !(_forSerialization && isRecord)) { + // 14-Nov-2024, tatu: Similarly need Creators for Records too (2.18+) + if (!_classDef.isNonStaticInnerClass()) { _addCreators(props); }