Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Cannot Reproduce
-
Affects Version/s: 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.9
-
Fix Version/s: None
-
Component/s: ObjectMapper
-
Labels:None
-
Environment:Linux OS;
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
-
Number of attachments :
Description
In some cases, when you call objectMapper.registerModule(module) before objectMapper.setDateFormat(dateFormat) the MapperConfig's protected HashMap<ClassKey,Class<?>> _mixInAnnotations gets mysteriously emptied. Note that this does not happen always, I have a unit test which just tests serialization and deserialization of an object and the test always passes, but in integration test environment this bug appears. However, if I first place objectMapper.setDateFormat(dateFormat) and then objectMapper.registerModule(module) things work nicely.
Sounds like a problem with immutable (copy) constructors – thank you for reporting, I will figure out why this happens.