File tree Expand file tree Collapse file tree 4 files changed +27
-8
lines changed
main/java/com/fasterxml/jackson/databind
test/java/com/fasterxml/jackson/databind Expand file tree Collapse file tree 4 files changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -207,3 +207,11 @@ Ludevik@github:
207
207
Antibrumm@github:
208
208
* Reported #691: Jackson 2.5.0. NullSerializer for MapProperty failing
209
209
(2.5.2)
210
+
211
+ Shumpei Akai (flexfrank@github)
212
+ * Reported #703: Multiple calls to ObjectMapper#canSerialize(Object.class) returns different values
213
+ (2.5.2)
214
+
215
+ Francisco A. Lozano (flozano@github)
216
+ * Contributed fix for #703 (see above)
217
+ (2.5.2)
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ Project: jackson-databind
8
8
9
9
#691: NullSerializer for MapProperty failing when using polymorphic handling
10
10
(reported by Antibrumm@github)
11
+ #703: Multiple calls to ObjectMapper#canSerialize(Object.class) returns different values
12
+ (reported by flexfrank@github)
11
13
12
14
2.5.1 (06-Feb-2015)
13
15
Original file line number Diff line number Diff line change @@ -1087,16 +1087,16 @@ protected JsonSerializer<Object> _findExplicitUntypedSerializer(Class<?> runtime
1087
1087
ser = _serializerCache .untypedValueSerializer (runtimeType );
1088
1088
if (ser == null ) {
1089
1089
ser = _createAndCacheUntypedSerializer (runtimeType );
1090
- /* 18-Sep-2014, tatu: This is unfortunate patch over related change
1091
- * that pushes creation of "unknown type" serializer deeper down
1092
- * in BeanSerializerFactory; as a result, we need to "undo" creation
1093
- * here.
1094
- */
1095
- if (isUnknownTypeSerializer (ser )) {
1096
- return null ;
1097
- }
1098
1090
}
1099
1091
}
1092
+ /* 18-Sep-2014, tatu: This is unfortunate patch over related change
1093
+ * that pushes creation of "unknown type" serializer deeper down
1094
+ * in BeanSerializerFactory; as a result, we need to "undo" creation
1095
+ * here.
1096
+ */
1097
+ if (isUnknownTypeSerializer (ser )) {
1098
+ return null ;
1099
+ }
1100
1100
return ser ;
1101
1101
}
1102
1102
Original file line number Diff line number Diff line change @@ -185,4 +185,13 @@ public void testAnnotationIntrospectorCopyin()
185
185
assertEquals (MyAnnotationIntrospector .class ,
186
186
m2 .getSerializationConfig ().getAnnotationIntrospector ().getClass ());
187
187
}
188
+
189
+ // For [databind#703]
190
+ public void testNonSerializabilityOfObject ()
191
+ {
192
+ ObjectMapper m = new ObjectMapper ();
193
+ assertFalse (m .canSerialize (Object .class ));
194
+ // but this used to pass, incorrectly
195
+ assertFalse (m .canSerialize (Object .class ));
196
+ }
188
197
}
You can’t perform that action at this time.
0 commit comments