File tree 4 files changed +16
-5
lines changed
main/java/com/fasterxml/jackson/databind
test/java/com/fasterxml/jackson/databind/module
4 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 858
858
does not provide " Type(Type(null))"
859
859
(2.9.9 )
860
860
861
- Daniil Barvitsky (dbarvitsky@github(
861
+ Daniil Barvitsky (dbarvitsky@github)
862
862
* Reported #2324 : `StringCollectionDeserializer` fails with custom collection
863
863
(2.9.9 )
864
864
865
+ Edgar Asatryan (nstdio@github)
866
+ * Reported #2374 : `ObjectMapper. getRegisteredModuleIds()` throws NPE if no modules registered
867
+ (2.9.10 )
868
+
865
869
Christoph Breitkopf (bokesan@github)
866
870
* Reported #2217 : Suboptimal memory allocation in `TextNode.getBinaryValue()`
867
871
(2.10.0 )
Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ Project: jackson-databind
57
57
58
58
#2326 : Block one more gadget type (CVE-2019 -12384 )
59
59
#2341 : Block one more gadget type (CVE-2019 -12814 )
60
+ #2374 : `ObjectMapper. getRegisteredModuleIds()` throws NPE if no modules registered
61
+ (reported by Edgar A)
60
62
61
63
2.9.9 (16 -May-2019 )
62
64
Original file line number Diff line number Diff line change @@ -988,10 +988,10 @@ public ObjectMapper registerModules(Iterable<? extends Module> modules)
988
988
*
989
989
* @since 2.9.6
990
990
*/
991
- public Set <Object > getRegisteredModuleIds () {
992
- return _registeredModuleTypes == null ?
993
- Collections . emptySet () :
994
- Collections .unmodifiableSet (_registeredModuleTypes );
991
+ public Set <Object > getRegisteredModuleIds ()
992
+ {
993
+ return ( _registeredModuleTypes == null ) ?
994
+ Collections .emptySet () : Collections . unmodifiableSet (_registeredModuleTypes );
995
995
}
996
996
997
997
/**
Original file line number Diff line number Diff line change @@ -319,13 +319,18 @@ public void testGetRegisteredModules()
319
319
AnotherSimpleModule mod2 = new AnotherSimpleModule ("test2" , Version .unknownVersion ());
320
320
321
321
ObjectMapper mapper = new ObjectMapper ();
322
+
322
323
mapper .registerModule (mod1 );
323
324
mapper .registerModule (mod2 );
324
325
325
326
Set <Object > registeredModuleIds = mapper .getRegisteredModuleIds ();
326
327
assertEquals (2 , registeredModuleIds .size ());
327
328
assertTrue (registeredModuleIds .contains (mod1 .getTypeId ()));
328
329
assertTrue (registeredModuleIds .contains (mod2 .getTypeId ()));
330
+
331
+ // 01-Jul-2019, [databind#2374]: verify empty list is fine
332
+ mapper = new ObjectMapper ();
333
+ assertEquals (0 , mapper .getRegisteredModuleIds ().size ());
329
334
}
330
335
331
336
/*
You can’t perform that action at this time.
0 commit comments