Skip to content

Commit

Permalink
Merge branch '2.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Apr 28, 2024
2 parents 1880205 + c176809 commit 81d11a3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
9 changes: 3 additions & 6 deletions release-notes/VERSION-2.x
Expand Up @@ -6,8 +6,6 @@ Project: jackson-databind

2.18.0 (not yet released)

#4443: Add `Iterable<T>` as recognized `IterationType` instance (along with
`Iterable`, `Stream`)
#4453: Allow JSON Integer to deserialize into a single-arg constructor of
parameter type `double`
(contributed by David M)
Expand Down Expand Up @@ -42,15 +40,14 @@ Project: jackson-databind
#4450: Empty QName deserialized as `null`
(reported by @winfriedgerlach)
#4471: Reconsider deprecation of `JsonNode.asText(defaultValue)`
(requested by @aerisnju)
(fix by Joo-Hyuk K)
(requested by @aerisnju)
(fix by Joo-Hyuk K)
#4481: Unable to override `DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL`
with `JsonFormat.Feature.READ_UNKNOWN_ENUM_VALUES_AS_NULL`
(reported by @luozhenyu)
#4489: Unable to override `DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE`
with `JsonFormat.Feature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE`
(reported by Joo-Hyuk K)
(fix by Joo-Hyuk K)
(fix by Joo-Hyuk K)
2.17.0 (12-Mar-2024)
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/tools/jackson/databind/type/TypeFactory.java
Expand Up @@ -1437,7 +1437,12 @@ protected JavaType _fromWellKnownClass(ClassStack context, Class<?> rawType, Typ
return _referenceType(rawType, bindings, superClass, superInterfaces);
}
if (rawType == Iterator.class || rawType == Stream.class
|| rawType == Iterable.class) {
// 27-Apr-2024, tatu: Tried to do [databind#4443] for 2.18 but that caused
// regression so cannot add "Iterable.class" without figuring out issue
// with HPPC `ObjectArrayList`s type hierarchy first
//
// || rawType == Iterable.class
) {
return _iterationType(rawType, bindings, superClass, superInterfaces);
}
// 23-May-2023, tatu: [databind#3950] IterationTypes
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/tools/jackson/databind/type/JavaTypeTest.java
Expand Up @@ -313,8 +313,6 @@ public void testIterationTypesDirect() throws Exception
Iterator.class, Object.class);
_verifyIteratorType(tf.constructType(Stream.class),
Stream.class, Object.class);
_verifyIteratorType(tf.constructType(Iterable.class),
Iterable.class, Object.class);

// Then generic but direct
JavaType t = _verifyIteratorType(tf.constructType(new TypeReference<Iterator<String>>() { }),
Expand Down
13 changes: 0 additions & 13 deletions src/test/java/tools/jackson/databind/type/TypeFactoryTest.java
Expand Up @@ -166,19 +166,6 @@ public void testIterator()
assertNull(t.containedType(1));
}

// [databind#4443]
@Test
public void testIterable()
{
TypeFactory tf = TypeFactory.defaultInstance();
JavaType t = tf.constructType(new TypeReference<Iterable<String>>() { });
assertEquals(IterationType.class, t.getClass());
assertTrue(t.isIterationType());
assertSame(Iterable.class, t.getRawClass());
assertEquals(1, t.containedTypeCount());
assertEquals(tf.constructType(String.class), t.containedType(0));
assertNull(t.containedType(1));
}
/**
* Test for verifying that parametric types can be constructed
* programmatically
Expand Down

0 comments on commit 81d11a3

Please sign in to comment.