Skip to content

Commit 161dd31

Browse files
committed
Fix #4595: PropertyName.merge() not considering PropertyName.NO_NAME
1 parent 8e22209 commit 161dd31

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

release-notes/VERSION-2.x

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Project: jackson-databind
1616
#4577: Cannot deserialize value of type `java.math.BigDecimal` from
1717
String "3." (not a valid representation)
1818
(reported by @dmelisso)
19+
#4595: No way to explicitly disable wrapping in custom annotation processor
20+
(reported by @SimonCockx)
1921

2022
2.17.1 (04-May-2024)
2123

src/main/java/com/fasterxml/jackson/databind/PropertyName.java

+7
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ protected Object readResolve() {
8282
return NO_NAME;
8383
}
8484
*/
85+
// 22-Jun-2024, tatu: This is hopeful not problematic as marker
86+
// value should only be provided by AnnotationIntrospector etc,
87+
// but not stored in Deserializer/Serializer instances.
8588
}
8689
return this;
8790
}
@@ -127,6 +130,10 @@ public static PropertyName merge(PropertyName name1, PropertyName name2) {
127130
if (name2 == null) {
128131
return name1;
129132
}
133+
// 22-Jun-2024, tatu: [databind#4595] Should not merge NO_NAME
134+
if (name1 == NO_NAME) {
135+
return name1;
136+
}
130137
String ns = _nonEmpty(name1._namespace, name2._namespace);
131138
String simple = _nonEmpty(name1._simpleName, name2._simpleName);
132139

0 commit comments

Comments
 (0)