Skip to content

Commit 8af88f9

Browse files
authored
Merge branch '3.x' into 5342-fix-prevent-name-conflict-JsonAnyGetter
2 parents c239616 + fbe42c1 commit 8af88f9

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/main/java/tools/jackson/databind/BeanDescription.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,22 @@ public AnnotatedMember findJsonKeyAccessor() {
198198
*/
199199
public abstract AnnotatedMember findJsonValueAccessor();
200200

201+
/**
202+
* Method used to locate the Method or Field of introspected class that
203+
* is annotated with {@link com.fasterxml.jackson.annotation.JsonAnyGetter}
204+
* (or equivalent annotation).
205+
* If no such {@code AnnotatedMember} exists {@code null} is returned.
206+
* If more than one are found, an exception is thrown.
207+
*/
201208
public abstract AnnotatedMember findAnyGetter();
202209

203210
/**
204211
* Method used to locate a mutator (settable field, or 2-argument set method)
205212
* of introspected class that
206-
* implements {@link com.fasterxml.jackson.annotation.JsonAnySetter}.
207-
* If no such mutator exists null is returned. If more than one are found,
208-
* an exception is thrown.
213+
* is annotated with {@link com.fasterxml.jackson.annotation.JsonAnySetter}
214+
* (or equivalent annotation).
215+
* If no such mutator exists {@code null} is returned.
216+
* If more than one are found an exception is thrown.
209217
* Additional checks are also made to see that method signature
210218
* is acceptable: needs to take 2 arguments, first one String or
211219
* Object; second any can be any type.

src/main/java/tools/jackson/databind/ser/BeanSerializerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ protected ValueSerializer<Object> constructBeanOrAddOnSerializer(SerializationCo
324324
// First: any detectable (auto-detect, annotations) properties to serialize?
325325
List<BeanPropertyWriter> props = findBeanProperties(ctxt, beanDescRef, builder);
326326
if (props == null) {
327-
props = new ArrayList<BeanPropertyWriter>();
327+
props = new ArrayList<>();
328328
} else {
329329
props = removeOverlappingTypeIds(ctxt, beanDescRef, builder, props);
330330
}

0 commit comments

Comments
 (0)