@@ -261,8 +261,7 @@ public boolean useForType(JavaType t)
261
261
* you can think of it as injecting annotations between the target
262
262
* class and its sub-classes (or interfaces)
263
263
*/
264
- protected final HashMap <ClassKey ,Class <?>> _mixInAnnotations
265
- = new HashMap <ClassKey ,Class <?>>();
264
+ protected final HashMap <ClassKey ,Class <?>> _mixInAnnotations ;
266
265
267
266
/*
268
267
/**********************************************************
@@ -390,6 +389,7 @@ protected ObjectMapper(ObjectMapper src)
390
389
_typeFactory = src ._typeFactory ;
391
390
_serializationConfig = src ._serializationConfig ;
392
391
HashMap <ClassKey ,Class <?>> mixins = new HashMap <ClassKey ,Class <?>>(src ._mixInAnnotations );
392
+ _mixInAnnotations = mixins ;
393
393
_serializationConfig = new SerializationConfig (src ._serializationConfig , mixins );
394
394
_deserializationConfig = new DeserializationConfig (src ._deserializationConfig , mixins );
395
395
_serializerProvider = src ._serializerProvider ;
@@ -432,11 +432,13 @@ public ObjectMapper(JsonFactory jf,
432
432
_rootNames = new RootNameLookup ();
433
433
// and default type factory is shared one
434
434
_typeFactory = TypeFactory .defaultInstance ();
435
-
435
+
436
+ HashMap <ClassKey ,Class <?>> mixins = new HashMap <ClassKey ,Class <?>>();
437
+ _mixInAnnotations = mixins ;
436
438
_serializationConfig = new SerializationConfig (DEFAULT_BASE ,
437
- _subtypeResolver , _mixInAnnotations );
439
+ _subtypeResolver , mixins );
438
440
_deserializationConfig = new DeserializationConfig (DEFAULT_BASE ,
439
- _subtypeResolver , _mixInAnnotations );
441
+ _subtypeResolver , mixins );
440
442
441
443
// Some overrides we may need
442
444
final boolean needOrder = _jsonFactory .requiresPropertyOrdering ();
0 commit comments