[Git][java-team/jackson-annotations][upstream] New upstream version 2.23

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Mon Nov 9 16:57:47 GMT 2026



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


Commits:
d19ef196 by Emmanuel Bourg at 2026-11-09T17:07:25+01:00
New upstream version 2.23
- - - - -


9 changed files:

- .github/workflows/main.yml
- pom.xml
- release-notes/VERSION-2.x
- src/main/java/com/fasterxml/jackson/annotation/JsonInclude.java
- src/main/java/com/fasterxml/jackson/annotation/JsonProperty.java
- src/test/java/com/fasterxml/jackson/annotation/JsonAutoDetectTest.java
- src/test/java/com/fasterxml/jackson/annotation/JsonFormatTest.java
- src/test/java/com/fasterxml/jackson/annotation/JsonIncludeTest.java
- src/test/java/com/fasterxml/jackson/annotation/JsonSetterTest.java


Changes:

=====================================
.github/workflows/main.yml
=====================================
@@ -22,19 +22,19 @@ jobs:
     env:
       JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
     steps:
-    - uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+    - uses: actions/checkout at 3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
     - name: Set up JDK
-      uses: actions/setup-java at be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
+      uses: actions/setup-java at b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
       with:
         distribution: 'temurin'
         java-version: ${{ matrix.java_version }}
         cache: 'maven'
         server-id: central-snapshots
-        server-username: CI_DEPLOY_USERNAME
-        server-password: CI_DEPLOY_PASSWORD
+        server-username-env-var: CI_DEPLOY_USERNAME
+        server-password-env-var: CI_DEPLOY_PASSWORD
         # See https://github.com/actions/setup-java/blob/v2/docs/advanced-usage.md#Publishing-using-Apache-Maven
         # gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
-        # gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
+        # gpg-passphrase-env-var: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
     - name: Build
       run: ./mvnw -V -B -ff -ntp verify
     - name: Extract project Maven version


=====================================
pom.xml
=====================================
@@ -10,13 +10,13 @@
     <groupId>com.fasterxml.jackson</groupId>
     <!-- this is one of few Jackson modules that depends on parent and NOT jackson-bom -->
     <artifactId>jackson-parent</artifactId>
-    <version>2.22</version>
+    <version>2.23</version>
   </parent>
 
   <groupId>com.fasterxml.jackson.core</groupId>
   <artifactId>jackson-annotations</artifactId>
   <name>Jackson-annotations</name>
-  <version>2.22</version>
+  <version>2.23</version>
   <packaging>jar</packaging>
   <description>Core annotations used for value types, used by Jackson data binding package.
   </description>
@@ -34,7 +34,7 @@
     <connection>scm:git:git at github.com:FasterXML/jackson-annotations.git</connection>
     <developerConnection>scm:git:git at github.com:FasterXML/jackson-annotations.git</developerConnection>
     <url>https://github.com/FasterXML/jackson-annotations</url>
-    <tag>jackson-annotations-2.22</tag>
+    <tag>jackson-annotations-2.23</tag>
   </scm>
 
   <properties>
@@ -42,7 +42,7 @@
     <osgi.export>com.fasterxml.jackson.annotation.*;version=${project.version}</osgi.export>
 
     <!-- for Reproducible Builds -->
-    <project.build.outputTimestamp>2026-05-31T04:44:17Z</project.build.outputTimestamp>
+    <project.build.outputTimestamp>2026-11-07T23:52:42Z</project.build.outputTimestamp>
   </properties>
 
   <dependencies>


=====================================
release-notes/VERSION-2.x
=====================================
@@ -14,6 +14,10 @@ NOTE: Jackson 3.x components rely on 2.x annotations; there are no separate
 === Releases ===
 ------------------------------------------------------------------------
 
+2.23 (07-Nov-2026)
+
+No changes since 2.22
+
 2.22 (31-May-2026)
 
 #78: Add `@JsonApplyView` to allow changing active JsonView on submodels


=====================================
src/main/java/com/fasterxml/jackson/annotation/JsonInclude.java
=====================================
@@ -146,7 +146,7 @@ public @interface JsonInclude
          *  <li>null</li>
          *  <li>"absent" value of a referential type (like Java 8 `Optional`, or
          *     {@link java.util.concurrent.atomic.AtomicReference}); that is, something
-         *     that would not deference to a non-null value.
+         *     that would not dereference to a non-null value.
          * </ul>
          * This option is mostly used to work with "Optional"s (Java 8, Guava).
          *
@@ -312,7 +312,7 @@ public @interface JsonInclude
          *  <li>null</li>
          *  <li>"absent" value of a referential type (like Java 8 `Optional`, or
          *     {@link java.util.concurrent.atomic.AtomicReference}); that is, something
-         *     that would not deference to a non-null value.
+         *     that would not dereference to a non-null value.
          * </ul>
          * This option is mostly used to work with "Optional"s (Java 8, Guava).
          * <p>


=====================================
src/main/java/com/fasterxml/jackson/annotation/JsonProperty.java
=====================================
@@ -24,8 +24,9 @@ import java.lang.annotation.Target;
  * Java fields in a single declaration like:
  *<pre>
  * public class POJO {
- *    \@JsonProperty("a")
- *    public int a, b, c;
+ *   {@literal @JsonProperty}("a")
+ *   public int a, b, c;
+ * }
  *</pre>
  * since it would associate same annotation for all fields, leading to name
  * collision.
@@ -33,11 +34,11 @@ import java.lang.annotation.Target;
  * Starting with Jackson 2.6 this annotation may also be
  * used to change serialization of {@code Enum} like so:
  *<pre>
-public enum MyEnum {
-    {@literal @JsonProperty}("theFirstValue") THE_FIRST_VALUE,
-    {@literal @JsonProperty}("another_value") ANOTHER_VALUE;
-}
-</pre>
+ * public enum MyEnum {
+ *   {@literal @JsonProperty}("theFirstValue") THE_FIRST_VALUE,
+ *   {@literal @JsonProperty}("another_value") ANOTHER_VALUE;
+ * }
+ *</pre>
  * as an alternative to using {@link JsonValue} annotation.
  *<br>
  * NOTE: for {@code Enum}s, empty String is a valid value (and
@@ -49,7 +50,7 @@ public enum MyEnum {
  * of property: this property is only used by certain format backends (most
  * notably XML).
  *<p>
- * NOTE: if a exclusion marker like {@link JsonIgnore} is also present,
+ * NOTE: if an exclusion marker like {@link JsonIgnore} is also present,
  * property accessor is excluded; ignoral has higher precedence over inclusion.
  */
 @Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})


=====================================
src/test/java/com/fasterxml/jackson/annotation/JsonAutoDetectTest.java
=====================================
@@ -49,10 +49,7 @@ public class JsonAutoDetectTest
         assertEquals(JsonAutoDetect.class, v.valueFor());
 
         // and then standard method override basics...
-        int x = v.hashCode();
-        if (x == 0) { // not guaranteed in theory but...
-            fail();
-        }
+        assertNotEquals(0, v.hashCode());
 
         assertTrue(v.equals(v));
         // mostly to ensure no NPE or class cast exception:


=====================================
src/test/java/com/fasterxml/jackson/annotation/JsonFormatTest.java
=====================================
@@ -317,27 +317,27 @@ public class JsonFormatTest
         // Simple language-only
         JsonFormat.Value v = new JsonFormat.Value("", Shape.ANY, "en", "",
                 JsonFormat.Features.empty(), null, DEFAULT_RADIX);
-        assertEquals(new java.util.Locale("en"), v.getLocale());
+        assertEquals(java.util.Locale.ENGLISH, v.getLocale());
 
         // Language + country with underscore
         v = new JsonFormat.Value("", Shape.ANY, "en_US", "",
                 JsonFormat.Features.empty(), null, DEFAULT_RADIX);
-        assertEquals(new java.util.Locale("en", "US"), v.getLocale());
+        assertEquals(java.util.Locale.US, v.getLocale());
 
         // Language + country with hyphen
         v = new JsonFormat.Value("", Shape.ANY, "en-US", "",
                 JsonFormat.Features.empty(), null, DEFAULT_RADIX);
-        assertEquals(new java.util.Locale("en", "US"), v.getLocale());
+        assertEquals(java.util.Locale.US, v.getLocale());
 
         // Language + country + variant
         v = new JsonFormat.Value("", Shape.ANY, "en_US_POSIX", "",
                 JsonFormat.Features.empty(), null, DEFAULT_RADIX);
-        assertEquals(new java.util.Locale("en", "US", "POSIX"), v.getLocale());
+        assertEquals(new java.util.Locale.Builder().setLanguage("en").setRegion("US").setVariant("POSIX").build(), v.getLocale());
 
         // German locale
         v = new JsonFormat.Value("", Shape.ANY, "de_DE", "",
                 JsonFormat.Features.empty(), null, DEFAULT_RADIX);
-        assertEquals(new java.util.Locale("de", "DE"), v.getLocale());
+        assertEquals(java.util.Locale.GERMANY, v.getLocale());
     }
 
     @Test


=====================================
src/test/java/com/fasterxml/jackson/annotation/JsonIncludeTest.java
=====================================
@@ -73,10 +73,7 @@ public class JsonIncludeTest
     public void testStdOverrides() {
         assertEquals("JsonInclude.Value(value=NON_ABSENT,content=USE_DEFAULTS)",
                 JsonInclude.Value.construct(Include.NON_ABSENT, null).toString());
-        int x = EMPTY.hashCode();
-        if (x == 0) {
-            fail();
-        }
+        assertNotEquals(0, EMPTY.hashCode());
         assertFalse(EMPTY.equals(null));
         assertFalse(EMPTY.equals(""));
     }


=====================================
src/test/java/com/fasterxml/jackson/annotation/JsonSetterTest.java
=====================================
@@ -30,10 +30,7 @@ public class JsonSetterTest
     public void testStdMethods() {
         assertEquals("JsonSetter.Value(valueNulls=DEFAULT,contentNulls=DEFAULT)",
                 EMPTY.toString());
-        int x = EMPTY.hashCode();
-        if (x == 0) { // no fixed value, but should not evaluate to 0
-            fail();
-        }
+        assertNotEquals(0, EMPTY.hashCode());
         assertEquals(EMPTY, EMPTY);
         assertFalse(EMPTY.equals(null));
         assertFalse(EMPTY.equals("xyz"));



View it on GitLab: https://salsa.debian.org/java-team/jackson-annotations/-/commit/d19ef196032effa512856d88a7fefbd46d247645

-- 
View it on GitLab: https://salsa.debian.org/java-team/jackson-annotations/-/commit/d19ef196032effa512856d88a7fefbd46d247645
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/148233b6/attachment.htm>


More information about the pkg-java-commits mailing list