Can somehow please help me understand this:
If I initialize a HashMap inline as follows:
Map<String, Object> updates = new HashMap<String, Object>(){{
put("some-key", "some-value";
}};
and I attempt to call some REST service, with this instance, it is not serialized correctly and service end point receives null.
If, however, I initialize the HashMap using regular mechanism:
Map<String, Object> updates = new HashMap<>();
updates.put("some-key", "some-value");
This works just fine. Values come across. Anyone seen this?