From 01fd70123b4843c51a26473265096ef4dcacfc46 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Tue, 19 Dec 2023 18:04:15 -0800 Subject: [PATCH] Mark #303 as fixed in 2.16.1; move now passing test to guard against regression --- ...eption303Test.java => DatabindRead303Test.java} | 14 +++++++------- release-notes/VERSION-2.x | 5 +++++ 2 files changed, 12 insertions(+), 7 deletions(-) rename ion/src/test/java/com/fasterxml/jackson/dataformat/ion/{failing/UncaughtException303Test.java => DatabindRead303Test.java} (67%) diff --git a/ion/src/test/java/com/fasterxml/jackson/dataformat/ion/failing/UncaughtException303Test.java b/ion/src/test/java/com/fasterxml/jackson/dataformat/ion/DatabindRead303Test.java similarity index 67% rename from ion/src/test/java/com/fasterxml/jackson/dataformat/ion/failing/UncaughtException303Test.java rename to ion/src/test/java/com/fasterxml/jackson/dataformat/ion/DatabindRead303Test.java index c543110c8..23f5b7f77 100644 --- a/ion/src/test/java/com/fasterxml/jackson/dataformat/ion/failing/UncaughtException303Test.java +++ b/ion/src/test/java/com/fasterxml/jackson/dataformat/ion/DatabindRead303Test.java @@ -1,15 +1,14 @@ -package com.fasterxml.jackson.dataformat.ion.failing; +package com.fasterxml.jackson.dataformat.ion; import java.net.URL; import org.junit.Test; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.dataformat.ion.IonObjectMapper; +import com.fasterxml.jackson.core.exc.StreamReadException; import static org.junit.Assert.*; -public class UncaughtException303Test +public class DatabindRead303Test { private final IonObjectMapper MAPPER = IonObjectMapper.builder().build(); @@ -21,9 +20,10 @@ public void testUncaughtException303() throws Exception try { MAPPER.readTree(poc); fail("Should not pass with invalid content"); - } catch (JsonProcessingException e) { - // !!! TODO: change to match what we actually expect - verifyException(e, "MATCH MESSAGE"); + } catch (StreamReadException e) { + // 19-Dec-2023, tatu: Looks like message depends on ion-java version, + // cannot easily verify + // verifyException(e, "Value exceeds the length of its parent container"); } } diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index 424fe20c2..d7eb12313 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -14,6 +14,11 @@ Active maintainers: === Releases === ------------------------------------------------------------------------ +2.16.1 (not yet released) + +#303: `NullPointerException` in `IonParser.nextToken()` + (reported by @ZanderHuang) + 2.16.0 (15-Nov-2023) #400: (avro) Rewrite Avro buffer recycling (`ApacheCodecRecycler.java`) to