[Git][java-team/jackson-jr][upstream] New upstream version 2.23.0

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Mon Nov 9 17:10:21 GMT 2026



Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / jackson-jr


Commits:
708c8e07 by Emmanuel Bourg at 2026-11-09T17:07:39+01:00
New upstream version 2.23.0
- - - - -


19 changed files:

- .github/workflows/main.yml
- + CLAUDE.md
- jr-all/pom.xml
- jr-annotation-support/pom.xml
- jr-extension-javatime/pom.xml
- jr-groovy-test/pom.xml
- jr-objects/pom.xml
- jr-objects/src/main/java/com/fasterxml/jackson/jr/ob/impl/ArrayReader.java
- jr-objects/src/main/java/com/fasterxml/jackson/jr/ob/impl/CollectionReader.java
- jr-objects/src/main/java/com/fasterxml/jackson/jr/ob/impl/MapReader.java
- + jr-objects/src/test/java/com/fasterxml/jackson/jr/ob/ReadNestedContainers223Test.java
- jr-objects/src/test/java/com/fasterxml/jackson/jr/ob/ReadSimpleTest.java
- jr-objects/src/test/java/com/fasterxml/jackson/jr/ob/WriteSimpleTest.java
- jr-record-test/pom.xml
- jr-retrofit2/pom.xml
- jr-stree/pom.xml
- pom.xml
- release-notes/CREDITS-2.x
- release-notes/VERSION-2.x


Changes:

=====================================
.github/workflows/main.yml
=====================================
@@ -52,7 +52,7 @@ jobs:
       run: ./mvnw -B -q -ff -ntp test
     - name: Publish code coverage
       if: ${{ github.event_name != 'pull_request' && matrix.java_version == '8' }}
-      uses: codecov/codecov-action at 5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
+      uses: codecov/codecov-action at 303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
       with:
         token: ${{ secrets.CODECOV_TOKEN }}
         files: ./target/site/jacoco/jacoco.xml


=====================================
CLAUDE.md
=====================================
@@ -0,0 +1,84 @@
+# CLAUDE.md
+
+This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
+
+## What this is
+
+Jackson jr is a compact alternative to `jackson-databind`: a subset of databinding (JDK types, Beans, Records) built directly on the `jackson-core` streaming API. Small jar size and low startup overhead are the reason it exists, so `jr-objects` must depend only on `jackson-core`, and new functionality should be weighed against its size cost. Optional functionality belongs in an extension module.
+
+## Branches: 2.x and 3.x differ substantially
+
+This checkout holds both major versions, so check the current branch before assuming package names or Java level.
+
+| | 2.x line | 3.x line |
+|---|---|---|
+| Maven group / Java package | `com.fasterxml.jackson.jr` | `tools.jackson.jr` |
+| Streaming dependency | `com.fasterxml.jackson.core` | `tools.jackson.core` |
+| Java level (CI JDKs) | 8 (8, 11, 17, 21) | 17 (17, 21, 23) |
+| Exceptions on the `JSON` API | checked `IOException` | unchecked `JacksonException` |
+| Module descriptors | generated by Moditect | `module-info.java` in the source tree, including tests |
+| Record tests | separate `jr-record-test` module | in `jr-objects` tests |
+| Release notes | `release-notes/VERSION-2.x` | `release-notes/VERSION` |
+
+Changes flow by forward-merging: `2.x` is merged into `3.x`, and older release branches into newer ones (`2.22` -> `2.x`, `3.2` -> `3.x`). A fix needed in both lines usually starts on the oldest applicable branch.
+
+**After switching between 2.x and 3.x, build with `clean`.** `target/generated-sources` is not cleared automatically, so a stale `PackageVersion.java` from the other line causes "cannot find symbol" compile errors.
+
+## Commands
+
+Use the Maven wrapper. CI runs the first command below.
+
+```sh
+./mvnw -B -q -ff -ntp verify                     # full build and tests, as in CI
+./mvnw clean install                             # build and install locally
+
+./mvnw test -pl jr-objects                       # tests for one module
+./mvnw test -pl jr-objects -Dtest=ReadMapTest    # one test class
+./mvnw test -pl jr-objects -Dtest='ReadMapTest#testName'   # one test method
+
+# Module that depends on others: -am builds them from the reactor too.
+# The extra flag stops upstream modules failing because they lack the named test.
+./mvnw test -pl jr-stree -am -Dtest=CreateNodesTest -Dsurefire.failIfNoSpecifiedTests=false
+```
+
+There is no separate lint or format step.
+
+## Modules
+
+- `jr-objects`: the core: `JSON` API, readers, writers, composers, type resolution.
+- `jr-stree`: minimal immutable `TreeCodec` implementation (`Jrs*` nodes).
+- `jr-annotation-support`: subset of Jackson annotations, as an extension.
+- `jr-extension-javatime`: subset of `java.time` types, as an extension.
+- `jr-retrofit2`: Retrofit 2 converters.
+- `jr-all`: uber-jar of `jr-objects` and `jr-stree`, with `jackson-core` relocated (shaded) to `...jr.private_`.
+- `jr-record-test` (2.x only), `jr-groovy-test`: test-only modules. `jr-record-test` compiles `src/test-jdk17` only when built on JDK 17 or later, so Record tests silently don't run on older JDKs.
+
+## Architecture (`jr-objects`)
+
+**`JSON` is the immutable, thread-safe entry point.** `JSON.std` is the default instance; `with(...)`/`without(...)` and `JSON.builder()` produce new instances. It owns the `JsonFactory`, features bitmask, `TreeCodec`, and "root" `JSONReader`, `JSONWriter`, `ValueReaderLocator` and `ValueWriterLocator`.
+
+**Each operation uses per-operation instances.** Every read or write calls `perOperationInstance(...)` on the root reader/writer, which does the same on its locator. Roots hold shared configuration and caches, and per-operation copies hold the parser/generator and transient state. Custom `JSONReader`/`JSONWriter` subclasses must override `perOperationInstance`.
+
+**Reading and writing are structured differently:**
+
+- **Reading** is object-based. `ValueReaderLocator` resolves a type (using `TypeResolver` from the `type` package) to a `ValueReader`: `BeanReader`, `MapReader`, `CollectionReader`, `ArrayReader`, `EnumReader`, `SimpleValueReader`, or `AnyReader` for untyped content. Resolved readers are cached in a bounded cache, with handling for recursive types.
+- **Writing** is switch-based for speed. `ValueWriterLocator` maps a class to an `int` type code (`SER_*` in `ValueLocatorBase`, shared with the reader side), and `JSONWriter` dispatches on it. There are parallel switches in `_writeValue` and `writeField`, so a new built-in type has to be added to both. Negative type codes are outside the switch and mean a Bean or an explicit `ValueWriter`.
+
+**Bean introspection:** `BeanPropertyIntrospector` builds a `POJODefinition` (properties and constructors), which the locators turn into `BeanReader`/`BeanWriter`. `RecordsHelpers` detects Records reflectively, so the code compiles on Java 8.
+
+**Extension points** live in `ob.api` and are the way to add behavior without touching the core:
+
+- `JacksonJrExtension` is registered through `JSON.builder().register(...)` and receives an `ExtensionContext`.
+- `ReaderWriterProvider` supplies custom `ValueReader`/`ValueWriter`s. Providers are chained, and each is registered at either the highest or lowest precedence.
+- `ReaderWriterModifier` adjusts `POJODefinition`s and handlers. `jr-annotation-support` is built on this: it applies annotations by rewriting the definition, while `jr-objects` itself knows nothing about annotations.
+- `MapBuilder` and `CollectionBuilder` control the container types constructed when reading.
+
+**Composers** (`ob.comp`, entered through `JSON.composeString()` etc.) are a separate fluent write path directly over `JsonGenerator`, with no POJO model involved.
+
+## Build and test conventions
+
+- `PackageVersion.java` is generated from `PackageVersion.java.in` during the build: edit the template, not the generated file.
+- `javac.debuglevel` is set to `source` to minimize jar size, dropping line numbers and local variable names from compiled classes. Expect stack traces without line numbers.
+- Tests use JUnit 5 and generally extend the module's test base (`TestBase` in `jr-objects`). Regression tests are named after the issue number, e.g. `ReadNestedContainers223Test`.
+- Tests for known, unfixed bugs go in the `tofix` test package, annotated `@JacksonTestFailureExpected`. They pass while the bug exists and fail once it is fixed, at which point the test should move out of `tofix` and lose the annotation.
+- User-visible changes get an entry in the release notes file for the branch (see the table above), under the unreleased version. Contributors are listed in `release-notes/CREDITS-2.x`.


=====================================
jr-all/pom.xml
=====================================
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.fasterxml.jackson.jr</groupId>
     <artifactId>jackson-jr-parent</artifactId>
-    <version>2.22.4</version>
+    <version>2.23.0</version>
   </parent>
   <artifactId>jackson-jr-all</artifactId>
   <name>Jackson-jr: uber-jar</name>
@@ -23,7 +23,7 @@ Streaming, in a single jar.
 
   <properties>
     <!-- for Reproducible Builds -->
-    <project.build.outputTimestamp>2026-10-17T23:13:34Z</project.build.outputTimestamp>
+    <project.build.outputTimestamp>2026-11-08T00:21:12Z</project.build.outputTimestamp>
   </properties>
 
   <dependencies>


=====================================
jr-annotation-support/pom.xml
=====================================
@@ -8,7 +8,7 @@
   <parent>
     <groupId>com.fasterxml.jackson.jr</groupId>
     <artifactId>jackson-jr-parent</artifactId>
-    <version>2.22.4</version>
+    <version>2.23.0</version>
   </parent>
   <artifactId>jackson-jr-annotation-support</artifactId>
   <name>Jackson-jr: Jackson annotation support</name>
@@ -34,7 +34,7 @@
     <packageVersion.package>${project.groupId}.annotationsupport</packageVersion.package>
 
     <!-- for Reproducible Builds -->
-    <project.build.outputTimestamp>2026-10-17T23:13:34Z</project.build.outputTimestamp>
+    <project.build.outputTimestamp>2026-11-08T00:21:12Z</project.build.outputTimestamp>
   </properties>
 
   <dependencies>


=====================================
jr-extension-javatime/pom.xml
=====================================
@@ -9,7 +9,7 @@
     <parent>
         <groupId>com.fasterxml.jackson.jr</groupId>
         <artifactId>jackson-jr-parent</artifactId>
-        <version>2.22.4</version>
+        <version>2.23.0</version>
     </parent>
 
     <artifactId>jackson-jr-extension-javatime</artifactId>
@@ -33,7 +33,7 @@
         <osgi.export>${project.groupId}.extension.javatime;version=${project.version}</osgi.export>
 
         <!-- for Reproducible Builds -->
-        <project.build.outputTimestamp>2026-10-17T23:13:34Z</project.build.outputTimestamp>
+        <project.build.outputTimestamp>2026-11-08T00:21:12Z</project.build.outputTimestamp>
     </properties>
 
     <dependencies>


=====================================
jr-groovy-test/pom.xml
=====================================
@@ -3,7 +3,7 @@
     <parent>
         <groupId>com.fasterxml.jackson.jr</groupId>
         <artifactId>jackson-jr-parent</artifactId>
-        <version>2.22.4</version>
+        <version>2.23.0</version>
     </parent>
     <artifactId>jackson-jr-groovy-test</artifactId>
     <name>Jackson-jr: Groovy test(s)</name>


=====================================
jr-objects/pom.xml
=====================================
@@ -8,7 +8,7 @@
   <parent>
     <groupId>com.fasterxml.jackson.jr</groupId>
     <artifactId>jackson-jr-parent</artifactId>
-    <version>2.22.4</version>
+    <version>2.23.0</version>
   </parent>
   <artifactId>jackson-jr-objects</artifactId>
   <name>Jackson-jr: Objects (main)</name>
@@ -32,7 +32,7 @@ has no other dependencies, and provides additional builder-style content generat
     <packageVersion.template.output>${generatedSourcesDir}/${packageVersion.dir}/PackageVersion.java</packageVersion.template.output>
 
     <!-- for Reproducible Builds -->
-    <project.build.outputTimestamp>2026-10-17T23:13:34Z</project.build.outputTimestamp>
+    <project.build.outputTimestamp>2026-11-08T00:21:12Z</project.build.outputTimestamp>
   </properties>
 
   <dependencies>


=====================================
jr-objects/src/main/java/com/fasterxml/jackson/jr/ob/impl/ArrayReader.java
=====================================
@@ -36,30 +36,37 @@ public class ArrayReader extends ValueReader
             return b.emptyArray(_elementType);
         }
         Object value = _valueReader.read(r, p);
-        if (p.nextToken() == JsonToken.END_ARRAY) {
+        if (!CollectionReader._hasMoreElements(p)) {
             return b.singletonArray(_elementType, value);
         }
         b = b.start().add(value);
         do {
             b = b.add(_valueReader.read(r, p));
-        } while (p.nextToken() != JsonToken.END_ARRAY);
+        } while (CollectionReader._hasMoreElements(p));
         return b.buildArray(_elementType);
     }
     
     @Override
     public Object read(JSONReader r, JsonParser p) throws IOException {
+        if (!p.hasToken(JsonToken.START_ARRAY)) {
+            if (p.hasToken(JsonToken.VALUE_NULL)) {
+                return null;
+            }
+            throw JSONObjectException.from(p, "Unexpected token %s; should get START_ARRAY",
+                    p.currentToken());
+        }
         CollectionBuilder b = r._collectionBuilder(null);
         if (p.nextToken() == JsonToken.END_ARRAY) {
             return b.emptyArray(_elementType);
         }
         Object value = _valueReader.read(r, p);
-        if (p.nextToken() == JsonToken.END_ARRAY) {
+        if (!CollectionReader._hasMoreElements(p)) {
             return b.singletonArray(_elementType, value);
         }
         b = b.start().add(value);
         do {
             b = b.add(_valueReader.read(r, p));
-        } while (p.nextToken() != JsonToken.END_ARRAY);
+        } while (CollectionReader._hasMoreElements(p));
         return b.buildArray(_elementType);
     }
 }


=====================================
jr-objects/src/main/java/com/fasterxml/jackson/jr/ob/impl/CollectionReader.java
=====================================
@@ -44,30 +44,53 @@ public class CollectionReader extends ValueReader
             return b.emptyCollection();
         }
         Object value = _valueReader.read(r, p);
-        if (p.nextToken() == JsonToken.END_ARRAY) {
+        if (!_hasMoreElements(p)) {
             return b.singletonCollection(value);
         }
         b = b.start().add(value);
         do {
             b = b.add(_valueReader.read(r, p));
-        } while (p.nextToken() != JsonToken.END_ARRAY);
+        } while (_hasMoreElements(p));
         return b.buildCollection();
     }
         
     @Override
     public Object read(JSONReader r, JsonParser p) throws IOException {
+        if (!p.hasToken(JsonToken.START_ARRAY)) {
+            if (p.hasToken(JsonToken.VALUE_NULL)) {
+                return null;
+            }
+            throw JSONObjectException.from(p, "Unexpected token %s; should get START_ARRAY",
+                    p.currentToken());
+        }
         CollectionBuilder b = r._collectionBuilder(_collectionType);
         if (p.nextToken() == JsonToken.END_ARRAY) {
             return b.emptyCollection();
         }
         Object value = _valueReader.read(r, p);
-        if (p.nextToken() == JsonToken.END_ARRAY) {
+        if (!_hasMoreElements(p)) {
             return b.singletonCollection(value);
         }
         b = b.start().add(value);
         do {
             b = b.add(_valueReader.read(r, p));
-        } while (p.nextToken() != JsonToken.END_ARRAY);
+        } while (_hasMoreElements(p));
         return b.buildCollection();
     }
+
+    /**
+     * Helper method for advancing to the token after an array element. Fails on
+     * end-of-input: parser reports it as {@code null} (not as an exception) once past
+     * root-level content, which an element reader that consumes too many tokens
+     * can cause; reading more elements would then never reach {@code END_ARRAY}.
+     *
+     * @since 2.23
+     */
+    static boolean _hasMoreElements(JsonParser p) throws IOException {
+        final JsonToken t = p.nextToken();
+        if (t == null) {
+            throw JSONObjectException.from(p, "Unexpected end-of-input; should get array element or END_ARRAY");
+        }
+        return t != JsonToken.END_ARRAY;
+    }
 }
\ No newline at end of file


=====================================
jr-objects/src/main/java/com/fasterxml/jackson/jr/ob/impl/MapReader.java
=====================================
@@ -68,6 +68,13 @@ public class MapReader extends ValueReader
 
     @Override
     public Object read(JSONReader r, JsonParser p) throws IOException {
+        if (!p.hasToken(JsonToken.START_OBJECT)) {
+            if (p.hasToken(JsonToken.VALUE_NULL)) {
+                return null;
+            }
+            throw JSONObjectException.from(p, "Unexpected token %s; should get START_OBJECT",
+                    p.currentToken());
+        }
         MapBuilder b = r._mapBuilder(_mapType);
         String propName0 = p.nextFieldName();
         if (propName0 == null) {


=====================================
jr-objects/src/test/java/com/fasterxml/jackson/jr/ob/ReadNestedContainers223Test.java
=====================================
@@ -0,0 +1,226 @@
+package com.fasterxml.jackson.jr.ob;
+
+import java.io.IOException;
+import java.time.Duration;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.function.Executable;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.jr.ob.api.ReaderWriterProvider;
+import com.fasterxml.jackson.jr.ob.api.ValueReader;
+import com.fasterxml.jackson.jr.ob.impl.JSONReader;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+public class ReadNestedContainers223Test extends TestBase
+{
+    // Failure mode of the original problem is a busy loop: needs to be preemptive
+    // since that does not react to interrupts, so non-preemptive timeout never fires
+    private final static Duration HANG_TIMEOUT = Duration.ofSeconds(10);
+
+    static class NestedLists {
+        public List<List<Integer>> values;
+    }
+
+    static class NestedArrays {
+        public List<String[]> values;
+    }
+
+    static class ArraysOfArrays {
+        public String[][] values;
+    }
+
+    static class NestedMaps {
+        public List<Map<String, Integer>> values;
+    }
+
+    static class MapOfNestedLists {
+        public Map<String, List<List<Integer>>> values;
+    }
+
+    static class Greedy { }
+
+    // Skips one token too many, and (unlike standard readers) does not
+    // fail if that leads to end-of-input
+    static class GreedyReader extends ValueReader {
+        GreedyReader() {
+            super(Greedy.class);
+        }
+
+        @Override
+        public Object read(JSONReader r, JsonParser p) throws IOException {
+            p.nextToken();
+            return new Greedy();
+        }
+    }
+
+    static class GreedyList {
+        public List<Greedy> values;
+    }
+
+    static class GreedyArray {
+        public Greedy[] values;
+    }
+
+    private final JSON GREEDY_JSON = jsonWithProvider(new ReaderWriterProvider() {
+        @Override
+        public ValueReader findValueReader(JSONReader ctxt, Class<?> type) {
+            return (type == Greedy.class) ? new GreedyReader() : null;
+        }
+    });
+
+    /*
+    /**********************************************************************
+    /* Test methods: invalid element, followed by more content
+    /**********************************************************************
+     */
+
+    @Test
+    public void testInvalidNestedList() throws Exception {
+        JSONObjectException e = assertThrows(JSONObjectException.class,
+                () -> JSON.std.beanFrom(NestedLists.class, "{\"values\":[5,[1]]}"));
+        verifyException(e, "Unexpected token VALUE_NUMBER_INT; should get START_ARRAY");
+    }
+
+    @Test
+    public void testInvalidNestedArray() throws Exception {
+        JSONObjectException e = assertThrows(JSONObjectException.class,
+                () -> JSON.std.beanFrom(NestedArrays.class,
+                        a2q("{'values':['x',['a']]}")));
+        verifyException(e, "Unexpected token VALUE_STRING; should get START_ARRAY");
+    }
+
+    /*
+    /**********************************************************************
+    /* Test methods: invalid element as the last one (used to never return)
+    /**********************************************************************
+     */
+
+    @Test
+    public void testInvalidLastElementInBean() throws Exception {
+        _verifyFails(() -> JSON.std.beanFrom(NestedLists.class, "{\"values\":[5]}"),
+                "Unexpected token VALUE_NUMBER_INT; should get START_ARRAY");
+        _verifyFails(() -> JSON.std.beanFrom(NestedLists.class, "{\"values\":[[1],5]}"),
+                "Unexpected token VALUE_NUMBER_INT; should get START_ARRAY");
+        _verifyFails(() -> JSON.std.beanFrom(NestedLists.class, "{\"values\":[true]}"),
+                "Unexpected token VALUE_TRUE; should get START_ARRAY");
+        _verifyFails(() -> JSON.std.beanFrom(NestedLists.class, "{\"values\":[{}]}"),
+                "Unexpected token START_OBJECT; should get START_ARRAY");
+        _verifyFails(() -> JSON.std.beanFrom(NestedArrays.class, a2q("{'values':['x']}")),
+                "Unexpected token VALUE_STRING; should get START_ARRAY");
+        _verifyFails(() -> JSON.std.beanFrom(ArraysOfArrays.class, "{\"values\":[5]}"),
+                "Unexpected token VALUE_NUMBER_INT; should get START_ARRAY");
+        _verifyFails(() -> JSON.std.beanFrom(MapOfNestedLists.class, a2q("{'values':{'a':[5]}}")),
+                "Unexpected token VALUE_NUMBER_INT; should get START_ARRAY");
+    }
+
+    @Test
+    public void testInvalidLastElementAtRoot() throws Exception {
+        _verifyFails(() -> JSON.std.arrayOfFrom(String[].class, "[5]"),
+                "Unexpected token VALUE_NUMBER_INT; should get START_ARRAY");
+        _verifyFails(() -> JSON.std.listOfFrom(String[].class, "[5]"),
+                "Unexpected token VALUE_NUMBER_INT; should get START_ARRAY");
+    }
+
+    /*
+    /**********************************************************************
+    /* Test methods: end-of-input, regardless of element reader used
+    /**********************************************************************
+     */
+
+    @Test
+    public void testEndOfInputWithGreedyReaderAtRoot() throws Exception {
+        _verifyFails(() -> GREEDY_JSON.listOfFrom(Greedy.class, "[1]"),
+                "Unexpected end-of-input");
+        _verifyFails(() -> GREEDY_JSON.arrayOfFrom(Greedy.class, "[1]"),
+                "Unexpected end-of-input");
+        // Above fail right after the first element; these after later ones
+        _verifyFails(() -> GREEDY_JSON.listOfFrom(Greedy.class, "[1,2,3]"),
+                "Unexpected end-of-input");
+        _verifyFails(() -> GREEDY_JSON.arrayOfFrom(Greedy.class, "[1,2,3]"),
+                "Unexpected end-of-input");
+    }
+
+    // Not hanging, but used to call element reader with no current token
+    @Test
+    public void testEndOfInputAfterFirstElement() throws Exception {
+        _verifyFails(() -> JSON.std.listOfFrom(int[].class, "[5]"),
+                "Unexpected end-of-input");
+        _verifyFails(() -> JSON.std.arrayOfFrom(int[].class, "[5]"),
+                "Unexpected end-of-input");
+    }
+
+    @Test
+    public void testEndOfInputWithGreedyReaderInBean() throws Exception {
+        _verifyFails(() -> GREEDY_JSON.beanFrom(GreedyList.class, "{\"values\":[1]}"),
+                "Unexpected end-of-input");
+        _verifyFails(() -> GREEDY_JSON.beanFrom(GreedyArray.class, "{\"values\":[1]}"),
+                "Unexpected end-of-input");
+    }
+
+    /*
+    /**********************************************************************
+    /* Test methods: Map elements
+    /**********************************************************************
+     */
+
+    @Test
+    public void testInvalidNestedMap() throws Exception {
+        _verifyFails(() -> JSON.std.beanFrom(NestedMaps.class, "{\"values\":[5]}"),
+                "Unexpected token VALUE_NUMBER_INT; should get START_OBJECT");
+        _verifyFails(() -> JSON.std.beanFrom(NestedMaps.class, a2q("{'values':[5,{'a':1}]}")),
+                "Unexpected token VALUE_NUMBER_INT; should get START_OBJECT");
+        _verifyFails(() -> JSON.std.beanFrom(NestedMaps.class, "{\"values\":[[]]}"),
+                "Unexpected token START_ARRAY; should get START_OBJECT");
+    }
+
+    @Test
+    public void testValidNestedMapsWithNulls() throws Exception {
+        NestedMaps maps = JSON.std.beanFrom(NestedMaps.class,
+                a2q("{'values':[null,{},{'a':1,'b':null}]}"));
+        Map<String, Integer> expected = new LinkedHashMap<>();
+        expected.put("a", 1);
+        expected.put("b", null);
+        assertEquals(Arrays.asList(null, Collections.emptyMap(), expected), maps.values);
+    }
+
+    /*
+    /**********************************************************************
+    /* Test methods: valid content
+    /**********************************************************************
+     */
+
+    @Test
+    public void testValidNestedContainersWithNulls() throws Exception {
+        NestedLists lists = JSON.std.beanFrom(NestedLists.class,
+                "{\"values\":[null,[],[1,2]]}");
+        assertEquals(Arrays.asList(null, Collections.emptyList(), Arrays.asList(1, 2)),
+                lists.values);
+
+        NestedArrays arrays = JSON.std.beanFrom(NestedArrays.class,
+                a2q("{'values':[null,[],['a','b']]}"));
+        assertEquals(3, arrays.values.size());
+        assertNull(arrays.values.get(0));
+        assertArrayEquals(new String[0], arrays.values.get(1));
+        assertArrayEquals(new String[] { "a", "b" }, arrays.values.get(2));
+    }
+
+    @Test
+    public void testValidSingleNullElement() throws Exception {
+        NestedLists lists = assertTimeoutPreemptively(HANG_TIMEOUT,
+                () -> JSON.std.beanFrom(NestedLists.class, "{\"values\":[null]}"));
+        assertEquals(Collections.singletonList(null), lists.values);
+    }
+
+    private void _verifyFails(Executable read, String expectedMessage) {
+        JSONObjectException e = assertTimeoutPreemptively(HANG_TIMEOUT,
+                () -> assertThrows(JSONObjectException.class, read));
+        verifyException(e, expectedMessage);
+    }
+}


=====================================
jr-objects/src/test/java/com/fasterxml/jackson/jr/ob/ReadSimpleTest.java
=====================================
@@ -200,7 +200,7 @@ public class ReadSimpleTest extends TestBase
     public void testMiscUriTypes() throws Exception
     {
         final String URL_STR = "http://fasterxml.com";
-        final URL url = new URL(URL_STR);
+        final URL url = URI.create(URL_STR).toURL();
         assertEquals(url, JSON.std.beanFrom(URL.class, q(URL_STR)));
 
         Path p = Paths.get(new URI("file:///foo/bar.txt"));


=====================================
jr-objects/src/test/java/com/fasterxml/jackson/jr/ob/WriteSimpleTest.java
=====================================
@@ -74,7 +74,7 @@ public class WriteSimpleTest extends TestBase
         stuff.put("b", Boolean.TRUE);
         stuff.put("c", "foobar");
         stuff.put("d", UUID.fromString("8f88e079-7dc6-46f8-abfb-a533130f4ea0"));
-        stuff.put("e", new URL("https://github.com/FasterXML/jackson-jr?a=x&b=y"));
+        stuff.put("e", URI.create("https://github.com/FasterXML/jackson-jr?a=x&b=y").toURL());
         stuff.put("f", URI.create("https://github.com/FasterXML/jackson-jr?c=x&c=y"));
 
         assertEquals("{\"a\":15,\"b\":true,\"c\":\"foobar\",\"d\":\"8f88e079-7dc6-46f8-abfb-a533130f4ea0\"," +


=====================================
jr-record-test/pom.xml
=====================================
@@ -3,7 +3,7 @@
     <parent>
         <groupId>com.fasterxml.jackson.jr</groupId>
         <artifactId>jackson-jr-parent</artifactId>
-        <version>2.22.4</version>
+        <version>2.23.0</version>
     </parent>
     <artifactId>jackson-jr-record-test</artifactId>
     <name>Jackson-jr: Record test(s)</name>


=====================================
jr-retrofit2/pom.xml
=====================================
@@ -8,7 +8,7 @@
   <parent>
     <groupId>com.fasterxml.jackson.jr</groupId>
     <artifactId>jackson-jr-parent</artifactId>
-    <version>2.22.4</version>
+    <version>2.23.0</version>
   </parent>
   <artifactId>jackson-jr-retrofit2</artifactId>
   <name>Jackson-jr: Retrofit2 support</name>
@@ -34,7 +34,7 @@ ${project.groupId}.retrofit2;version=${project.version}
       -->
 
     <!-- for Reproducible Builds -->
-    <project.build.outputTimestamp>2026-10-17T23:13:34Z</project.build.outputTimestamp>
+    <project.build.outputTimestamp>2026-11-08T00:21:12Z</project.build.outputTimestamp>
   </properties>
 
   <dependencies>


=====================================
jr-stree/pom.xml
=====================================
@@ -8,7 +8,7 @@
   <parent>
     <groupId>com.fasterxml.jackson.jr</groupId>
     <artifactId>jackson-jr-parent</artifactId>
-    <version>2.22.4</version>
+    <version>2.23.0</version>
   </parent>
   <artifactId>jackson-jr-stree</artifactId>
   <name>Jackson-jr: (simple) Tree extension</name>
@@ -35,7 +35,7 @@ has no other dependencies.
     <packageVersion.package>${project.groupId}.stree</packageVersion.package>
 
     <!-- for Reproducible Builds -->
-    <project.build.outputTimestamp>2026-10-17T23:13:34Z</project.build.outputTimestamp>
+    <project.build.outputTimestamp>2026-11-08T00:21:12Z</project.build.outputTimestamp>
   </properties>
 
   <dependencies>


=====================================
pom.xml
=====================================
@@ -3,12 +3,12 @@
   <parent>
     <groupId>com.fasterxml.jackson</groupId>
     <artifactId>jackson-base</artifactId>
-    <version>2.22.4</version>
+    <version>2.23.0</version>
   </parent>
   <groupId>com.fasterxml.jackson.jr</groupId>
   <artifactId>jackson-jr-parent</artifactId>
   <name>Parent pom for Jackson jr components</name>
-  <version>2.22.4</version>
+  <version>2.23.0</version>
   <packaging>pom</packaging>
   <description>Parent pom for Jackson jr components
   </description>
@@ -36,7 +36,7 @@
     <connection>scm:git:git at github.com:FasterXML/jackson-jr.git</connection>
     <developerConnection>scm:git:git at github.com:FasterXML/jackson-jr.git</developerConnection>
     <url>https://github.com/FasterXML/jackson-jr</url>
-    <tag>jackson-jr-parent-2.22.4</tag>
+    <tag>jackson-jr-parent-2.23.0</tag>
   </scm>
 
   <properties>
@@ -50,7 +50,7 @@
     <javac.debuglevel>source</javac.debuglevel>
 
     <!-- for Reproducible Builds -->
-    <project.build.outputTimestamp>2026-10-17T23:13:34Z</project.build.outputTimestamp>
+    <project.build.outputTimestamp>2026-11-08T00:21:12Z</project.build.outputTimestamp>
   </properties>
 
   <!-- Need to include snapshot reference to find snapshot of parent -->


=====================================
release-notes/CREDITS-2.x
=====================================
@@ -95,3 +95,9 @@ Juul Hobert (@juulhobert)
 * Reported #176: Cannot Deserialize JSON with `@JsonProperty` annotated Record fields
  (2.21.0)
 
+Oleg Tsvetkov (@Hekzory)
+
+* Reported, contributed fix for #223: Reading `List<List<X>>` or `List<String[]>`
+  never returns when an element isn't an array
+ (2.23.0)
+


=====================================
release-notes/VERSION-2.x
=====================================
@@ -11,6 +11,12 @@ Modules:
 === Releases ===
 ------------------------------------------------------------------------
 
+2.23.0 (07-Nov-2026)
+
+#223: Reading `List<List<X>>` or `List<String[]>` never returns when an element
+  isn't an array
+ (reported, fix contributed by Oleg T)
+
 2.22.4 (17-Oct-2026)
 2.22.3 (21-Sep-2026)
 2.22.2 (16-Aug-2026)



View it on GitLab: https://salsa.debian.org/java-team/jackson-jr/-/commit/708c8e079728e45108192c3c16f6746611d9d6bc

-- 
View it on GitLab: https://salsa.debian.org/java-team/jackson-jr/-/commit/708c8e079728e45108192c3c16f6746611d9d6bc
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20261109/96aebcd4/attachment.htm>


More information about the pkg-java-commits mailing list