Skip to content

Commit

Permalink
Merge branch '2.9' into 2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jul 2, 2019
2 parents a18e2c0 + 9e2a4a9 commit 1fae2f1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
6 changes: 5 additions & 1 deletion release-notes/CREDITS-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -858,10 +858,14 @@ Cyril Martin ([email protected])
does not provide "Type(Type(null))"
(2.9.9)

Daniil Barvitsky (dbarvitsky@github(
Daniil Barvitsky (dbarvitsky@github)
* Reported #2324: `StringCollectionDeserializer` fails with custom collection
(2.9.9)

Edgar Asatryan (nstdio@github)
* Reported #2374: `ObjectMapper. getRegisteredModuleIds()` throws NPE if no modules registered
(2.9.10)

Christoph Breitkopf (bokesan@github)
* Reported #2217: Suboptimal memory allocation in `TextNode.getBinaryValue()`
(2.10.0)
Expand Down
2 changes: 2 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ Project: jackson-databind

#2326: Block one more gadget type (CVE-2019-12384)
#2341: Block one more gadget type (CVE-2019-12814)
#2374: `ObjectMapper. getRegisteredModuleIds()` throws NPE if no modules registered
(reported by Edgar A)

2.9.9 (16-May-2019)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -988,10 +988,10 @@ public ObjectMapper registerModules(Iterable<? extends Module> modules)
*
* @since 2.9.6
*/
public Set<Object> getRegisteredModuleIds() {
return _registeredModuleTypes == null ?
Collections.emptySet() :
Collections.unmodifiableSet(_registeredModuleTypes);
public Set<Object> getRegisteredModuleIds()
{
return (_registeredModuleTypes == null) ?
Collections.emptySet() : Collections.unmodifiableSet(_registeredModuleTypes);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,18 @@ public void testGetRegisteredModules()
AnotherSimpleModule mod2 = new AnotherSimpleModule("test2", Version.unknownVersion());

ObjectMapper mapper = new ObjectMapper();

mapper.registerModule(mod1);
mapper.registerModule(mod2);

Set<Object> registeredModuleIds = mapper.getRegisteredModuleIds();
assertEquals(2, registeredModuleIds.size());
assertTrue(registeredModuleIds.contains(mod1.getTypeId()));
assertTrue(registeredModuleIds.contains(mod2.getTypeId()));

// 01-Jul-2019, [databind#2374]: verify empty list is fine
mapper = new ObjectMapper();
assertEquals(0, mapper.getRegisteredModuleIds().size());
}

/*
Expand Down

0 comments on commit 1fae2f1

Please sign in to comment.