Skip to content

Commit 90aeb43

Browse files
committed
Update release notes wrt #3505
1 parent a5c4632 commit 90aeb43

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

release-notes/CREDITS-2.x

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,3 +1487,8 @@ Igor Shymko (ancane@github)
14871487
Jordi Ortolá Ankum (Tomasito665@github)
14881488
* Contributed #3503: `StdDeserializer` coerces ints to floats even if configured to fail
14891489
(2.14.0)
1490+
1491+
Arnaud Solé (Bluexin@github)
1492+
* Contributed #3505: Fix deduction deserializer with DefaultTypeResolverBuilder
1493+
(2.14.0)
1494+

release-notes/VERSION-2.x

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Project: jackson-databind
4747
(contributed by Igor S)
4848
#3503: `StdDeserializer` coerces ints to floats even if configured to fail
4949
(contributed by Jordi O-A)
50+
#3505: Fix deduction deserializer with DefaultTypeResolverBuilder
51+
(contributed by Arnaud S)
5052
#3528: `TokenBuffer` defaults for parser/stream-read features neither passed
5153
from parser nor use real defaults
5254
#3530: Change LRUMap to just evict one entry when maxEntries reached
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.fasterxml.jackson.databind.deser;
1+
package com.fasterxml.jackson.databind.jsontype.deftyping;
22

33
import com.fasterxml.jackson.annotation.JsonTypeInfo;
44
import com.fasterxml.jackson.databind.BaseMapTest;
@@ -13,11 +13,12 @@
1313
import java.util.Collection;
1414
import java.util.List;
1515

16-
// Tests for [databind#pending] causing a NPE when setting a DefaultTypeResolverBuilder
16+
// Tests for [databind#3505] causing a NPE when setting a DefaultTypeResolverBuilder
1717
// and registering subtypes through ObjectMapper (no annotations)
18-
public class TestDeserializerFactoryWithDefaultTypeResolverBuilder extends BaseMapTest {
19-
20-
private interface Parent {
18+
public class DefaultTypeResolver3505Test
19+
extends BaseMapTest
20+
{
21+
interface Parent {
2122
class ChildOne implements Parent {
2223
public String one;
2324
}
@@ -30,8 +31,10 @@ class ChildTwo implements Parent {
3031
// This class is technically not needed for the test to fail without the fix
3132
// (AsDeductionTypeDeserializer will crash in #buildFingerprints), but was
3233
// added to have more assertions on the subtypes values
33-
private static final class AssertingTypeResolverBuilder extends ObjectMapper.DefaultTypeResolverBuilder {
34-
34+
@SuppressWarnings("serial")
35+
static final class AssertingTypeResolverBuilder
36+
extends ObjectMapper.DefaultTypeResolverBuilder
37+
{
3538
public AssertingTypeResolverBuilder() {
3639
super(ObjectMapper.DefaultTyping.NON_CONCRETE_AND_ARRAYS,
3740
BasicPolymorphicTypeValidator.builder().allowIfSubType(Parent.class).build());

0 commit comments

Comments
 (0)