[Git][java-team/objenesis][master] 6 commits: New upstream version 3.6

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Fri Sep 18 09:02:27 BST 2026



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / objenesis


Commits:
c038f96a by Emmanuel Bourg at 2026-09-18T09:40:06+02:00
New upstream version 3.6
- - - - -
c2986660 by Emmanuel Bourg at 2026-09-18T09:40:06+02:00
Update upstream source from tag 'upstream/3.6'

Update to upstream version '3.6'
with Debian dir ed0b0416253a26f883cf65d46cd65878788edef9
- - - - -
82098839 by Emmanuel Bourg at 2026-09-18T09:40:38+02:00
New upstream release (3.6)

- - - - -
4c65e4ba by Emmanuel Bourg at 2026-09-18T09:43:11+02:00
Refreshed debian/copyright

- - - - -
f3bed105 by Emmanuel Bourg at 2026-09-18T09:43:16+02:00
Standards-Version updated to 4.7.4

- - - - -
a191dbbf by Emmanuel Bourg at 2026-09-18T09:45:22+02:00
Upload to unstable

- - - - -


20 changed files:

- .github/workflows/auto-assign.yml
- .github/workflows/ci.yml
- benchmark/pom.xml
- debian/changelog
- debian/control
- debian/copyright
- deploy-website.sh
- deploy.sh
- exotic/pom.xml
- main/pom.xml
- main/src/main/java/org/objenesis/ObjenesisBase.java
- + main/src/test/java/org/objenesis/CachingAcrossClassLoadersTest.java
- main/src/test/java/org/objenesis/ObjenesisTest.java
- module-test/pom.xml
- pom.xml
- tck-android/pom.xml
- tck/pom.xml
- test/pom.xml
- website/pom.xml
- website/site/content/notes.html


Changes:

=====================================
.github/workflows/auto-assign.yml
=====================================
@@ -11,7 +11,7 @@ jobs:
          contents: write
       steps:
          -   name: Check if PR title starts with "Bump"
-             uses: actions/github-script at v8
+             uses: actions/github-script at v9
              with:
                 script: |
                    const prTitle = context.payload.pull_request.title;
@@ -26,7 +26,7 @@ jobs:
                 assignees: henri-tremblay
          -   name: Get open milestones
              if: steps.check_bump_pr.outputs.result == 'true'
-             uses: actions/github-script at v8
+             uses: actions/github-script at v9
              with:
                 script: |
                    const { data: milestones } = await github.rest.issues.listMilestones({
@@ -45,7 +45,7 @@ jobs:
 
          -   name: Assign the PR to the milestone
              if: steps.get_open_milestone.outputs.result
-             uses: actions/github-script at v8
+             uses: actions/github-script at v9
              with:
                 script: |
                    const milestoneNumber = parseInt("${{ steps.get_open_milestone.outputs.result }}", 10);


=====================================
.github/workflows/ci.yml
=====================================
@@ -17,11 +17,11 @@ jobs:
     timeout-minutes: 2
     strategy:
       matrix:
-        java: [ '8', '11', '17', '21', '25' ]
+        java: [ '8', '11', '17', '21', '25', '26' ]
     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 03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 #v5.6.0
       with:
         java-version: ${{ matrix.java }}
         distribution: 'temurin'


=====================================
benchmark/pom.xml
=====================================
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.objenesis</groupId>
     <artifactId>objenesis-parent</artifactId>
-    <version>3.5</version>
+    <version>3.6</version>
   </parent>
 
   <artifactId>objenesis-benchmark</artifactId>
@@ -58,7 +58,7 @@
     <dependency>
       <groupId>net.bytebuddy</groupId>
       <artifactId>byte-buddy</artifactId>
-      <version>1.18.4</version>
+      <version>1.18.11</version>
     </dependency>
   </dependencies>
 


=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+objenesis (3.6-1) unstable; urgency=medium
+
+  * Team upload
+  * New upstream release
+  * Refreshed debian/copyright
+  * Standards-Version updated to 4.7.4
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Fri, 18 Sep 2026 09:45:17 +0200
+
 objenesis (3.5-1) unstable; urgency=medium
 
   * Team upload


=====================================
debian/control
=====================================
@@ -10,7 +10,7 @@ Build-Depends:
  libmaven-bundle-plugin-java,
  libmaven-enforcer-plugin-java,
  maven-debian-helper (>= 1.4)
-Standards-Version: 4.7.3
+Standards-Version: 4.7.4
 Vcs-Git: https://salsa.debian.org/java-team/objenesis.git
 Vcs-Browser: https://salsa.debian.org/java-team/objenesis
 Homepage: https://www.objenesis.org/


=====================================
debian/copyright
=====================================
@@ -4,7 +4,7 @@ Upstream-Contact: Objenesis Team <http://groups.google.com/group/objenesis-dev>
 Source: https://github.com/easymock/objenesis
 
 Files: *
-Copyright: 2006-2025 Joe Walnes, Henri Tremblay, Leonardo Mesquita
+Copyright: 2006-2026 Joe Walnes, Henri Tremblay, Leonardo Mesquita
 License: Apache-2.0
 
 Files: debian/*


=====================================
deploy-website.sh
=====================================
@@ -16,7 +16,7 @@ fi
 
 # clone the website branch
 echo "************** CLONE ************************"
-git clone --depth=1 --branch gh-pages git at github.com:easymock/objenesis.git site
+git clone --depth=1 --branch gh-pages --single-branch git at github.com:easymock/objenesis.git site
 
 pushd site
 


=====================================
deploy.sh
=====================================
@@ -28,6 +28,7 @@ mvn versions:set -DremoveSnapshot=true -DgenerateBackupPoms=false -Pall
 echo "Deploy"
 mvn deploy -Pall,full,release
 echo "Check deployment to central"
+open "https://central.sonatype.com/publishing/deployments"
 pause
 
 echo "Commit release"


=====================================
exotic/pom.xml
=====================================
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.objenesis</groupId>
     <artifactId>objenesis-parent</artifactId>
-    <version>3.5</version>
+    <version>3.6</version>
   </parent>
 
   <artifactId>objenesis-exotic</artifactId>


=====================================
main/pom.xml
=====================================
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.objenesis</groupId>
     <artifactId>objenesis-parent</artifactId>
-    <version>3.5</version>
+    <version>3.6</version>
   </parent>
   <artifactId>objenesis</artifactId>
 


=====================================
main/src/main/java/org/objenesis/ObjenesisBase.java
=====================================
@@ -18,8 +18,6 @@ package org.objenesis;
 import org.objenesis.instantiator.ObjectInstantiator;
 import org.objenesis.strategy.InstantiatorStrategy;
 
-import java.util.concurrent.ConcurrentHashMap;
-
 /**
  * Base class to extend if you want to have a class providing your own default strategy. Can also be
  * instantiated directly.
@@ -32,7 +30,7 @@ public class ObjenesisBase implements Objenesis {
    protected final InstantiatorStrategy strategy;
 
    /** Strategy cache. Key = Class, Value = InstantiatorStrategy */
-   protected ConcurrentHashMap<String, ObjectInstantiator<?>> cache;
+   private final ClassValue<ObjectInstantiator<?>> cache;
 
    /**
     * Constructor allowing to pick a strategy and using cache
@@ -54,7 +52,11 @@ public class ObjenesisBase implements Objenesis {
          throw new IllegalArgumentException("A strategy can't be null");
       }
       this.strategy = strategy;
-      this.cache = useCache ? new ConcurrentHashMap<>() : null;
+      this.cache = useCache ? new ClassValue<ObjectInstantiator<?>>() {
+         @Override protected ObjectInstantiator<?> computeValue(Class<?> type) {
+            return strategy.newInstantiatorOf(type);
+         }
+      } : null;
    }
 
    @Override
@@ -89,14 +91,6 @@ public class ObjenesisBase implements Objenesis {
       if(cache == null) {
          return strategy.newInstantiatorOf(clazz);
       }
-      ObjectInstantiator<?> instantiator = cache.get(clazz.getName());
-      if(instantiator == null) {
-         ObjectInstantiator<?> newInstantiator = strategy.newInstantiatorOf(clazz);
-         instantiator = cache.putIfAbsent(clazz.getName(), newInstantiator);
-         if(instantiator == null) {
-            instantiator = newInstantiator;
-         }
-      }
-      return (ObjectInstantiator<T>) instantiator;
+      return (ObjectInstantiator<T>) cache.get(clazz);
    }
 }


=====================================
main/src/test/java/org/objenesis/CachingAcrossClassLoadersTest.java
=====================================
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2006-2026 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.objenesis;
+
+import org.junit.jupiter.api.Test;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import static org.junit.jupiter.api.Assertions.assertNotSame;
+import static org.junit.jupiter.api.Assertions.assertSame;
+
+class CachingAcrossClassLoadersTest {
+
+   @Test
+   void testCachingAcrossClassLoaders() throws Exception {
+      Objenesis shared = new ObjenesisStd();   // single shared instance across tenants
+
+      // two class loaders inheriting the class loader that loaded ObjenesisStd
+      // Each loads org.objenesis.Context from a different location (tenantA and tenantB directories)
+      URL[] urls = new URL[] {new File("target/test-classes").toURI().toURL()};
+      URLClassLoader clA = new URLClassLoader(urls, getClass().getClassLoader().getParent());
+      URLClassLoader clB = new URLClassLoader(urls, getClass().getClassLoader().getParent());
+
+      Class<?> classA = Class.forName("org.objenesis.Context", true, clA);
+      Class<?> classB = Class.forName("org.objenesis.Context", true, clB);
+      assertNotSame(classA, classB); // sanity check: different since they were loaded from different class loaders
+
+      // Create an object for classA
+      Object contextA = shared.newInstance(classA);
+      assertSame(classA, contextA.getClass(), "Loaded from " + classA.getClassLoader() + ":" + contextA.getClass().getClassLoader()); // should be a classA instance
+
+      // Create an object for classB
+      Object contextB = shared.newInstance(classB);
+      assertSame(classB, contextB.getClass(), "Loaded from " + classB.getClassLoader() + ":" + contextB.getClass().getClassLoader()); // should be a classB instance
+   }
+}
+
+class Context {}


=====================================
main/src/test/java/org/objenesis/ObjenesisTest.java
=====================================
@@ -20,6 +20,7 @@ import org.objenesis.instantiator.ObjectInstantiator;
 import org.objenesis.strategy.InstantiatorStrategy;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotSame;
 import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
@@ -34,6 +35,11 @@ public class ObjenesisTest {
       assertEquals(
          "org.objenesis.ObjenesisStd using org.objenesis.strategy.StdInstantiatorStrategy with caching",
          o.toString());
+
+      ObjectInstantiator<? extends ObjenesisTest> instantiator = o.getInstantiatorOf(getClass());
+      assertEquals(instantiator.newInstance().getClass(), getClass());
+      ObjectInstantiator<? extends ObjenesisTest> otherInstantiator = o.getInstantiatorOf(getClass());
+      assertSame(instantiator, otherInstantiator);
    }
 
    @Test
@@ -43,25 +49,10 @@ public class ObjenesisTest {
          "org.objenesis.ObjenesisStd using org.objenesis.strategy.StdInstantiatorStrategy without caching",
          o.toString());
 
-      assertEquals(o.getInstantiatorOf(getClass()).newInstance().getClass(), getClass());
-   }
-
-   @Test
-   public final void testNewInstance() {
-      Objenesis o = new ObjenesisStd();
-      assertEquals(getClass(), o.newInstance(getClass()).getClass());
-   }
-
-   @Test
-   public final void testGetInstantiatorOf() {
-      Objenesis o = new ObjenesisStd();
-      ObjectInstantiator<?> i1 = o.getInstantiatorOf(getClass());
-      // Test instance creation
-      assertEquals(getClass(), i1.newInstance().getClass());
-
-      // Test caching
-      ObjectInstantiator<?> i2 = o.getInstantiatorOf(getClass());
-      assertSame(i1, i2);
+      ObjectInstantiator<? extends ObjenesisTest> instantiator = o.getInstantiatorOf(getClass());
+      assertEquals(instantiator.newInstance().getClass(), getClass());
+      ObjectInstantiator<? extends ObjenesisTest> otherInstantiator = o.getInstantiatorOf(getClass());
+      assertNotSame(instantiator, otherInstantiator);
    }
 
    @Test


=====================================
module-test/pom.xml
=====================================
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.objenesis</groupId>
     <artifactId>objenesis-parent</artifactId>
-    <version>3.5</version>
+    <version>3.6</version>
   </parent>
 
   <artifactId>objenesis-module-test</artifactId>


=====================================
pom.xml
=====================================
@@ -20,7 +20,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.objenesis</groupId>
   <artifactId>objenesis-parent</artifactId>
-  <version>3.5</version>
+  <version>3.6</version>
   <packaging>pom</packaging>
 
   <name>Objenesis parent project</name>
@@ -75,10 +75,11 @@
 
   <properties>
     <java.version>1.8</java.version>
-    <project.build.outputTimestamp>2026-01-26T02:47:51Z</project.build.outputTimestamp>
+    <project.build.outputTimestamp>2026-08-02T07:52:44Z</project.build.outputTimestamp>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <junit5.version>5.13.4</junit5.version>
-    <spotbugs-maven-plugin.version>4.9.8.2</spotbugs-maven-plugin.version>
+    <license-maven-plugin.version>4.6</license-maven-plugin.version>
+    <spotbugs-maven-plugin.version>4.10.3.0</spotbugs-maven-plugin.version>
     <generateBackupPoms>false</generateBackupPoms>
   </properties>
 
@@ -142,11 +143,11 @@
       </plugin>
       <plugin>
         <artifactId>maven-enforcer-plugin</artifactId>
-        <version>3.6.2</version>
+        <version>3.6.3</version>
         <configuration>
           <rules>
             <requireMavenVersion>
-              <version>3.6.2</version>
+              <version>3.6.3</version>
             </requireMavenVersion>
           </rules>
         </configuration>
@@ -168,7 +169,7 @@
       <plugin>
         <groupId>org.gaul</groupId>
         <artifactId>modernizer-maven-plugin</artifactId>
-        <version>3.2.0</version>
+        <version>3.5.0</version>
         <configuration>
           <javaVersion>8</javaVersion>
         </configuration>
@@ -190,7 +191,7 @@
         </plugin>
         <plugin>
           <artifactId>maven-compiler-plugin</artifactId>
-          <version>3.14.1</version>
+          <version>3.15.0</version>
         </plugin>
         <plugin>
           <artifactId>maven-deploy-plugin</artifactId>
@@ -206,7 +207,7 @@
         </plugin>
         <plugin>
           <artifactId>maven-jar-plugin</artifactId>
-          <version>3.5.0</version>
+          <version>3.5.1</version>
         </plugin>
         <plugin>
           <artifactId>maven-javadoc-plugin</artifactId>
@@ -214,7 +215,7 @@
         </plugin>
         <plugin>
           <artifactId>maven-resources-plugin</artifactId>
-          <version>3.4.0</version>
+          <version>3.5.0</version>
         </plugin>
         <plugin>
           <artifactId>maven-scm-plugin</artifactId>
@@ -222,11 +223,11 @@
         </plugin>
         <plugin>
           <artifactId>maven-shade-plugin</artifactId>
-          <version>3.6.1</version>
+          <version>3.6.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-site-plugin</artifactId>
-          <version>3.21.0</version>
+          <version>3.22.0</version>
         </plugin>
         <plugin>
           <artifactId>maven-source-plugin</artifactId>
@@ -234,7 +235,7 @@
         </plugin>
         <plugin>
           <artifactId>maven-surefire-plugin</artifactId>
-          <version>3.5.4</version>
+          <version>3.5.6</version>
         </plugin>
         <plugin>
           <artifactId>maven-war-plugin</artifactId>
@@ -265,7 +266,7 @@
         <plugin>
           <groupId>com.mycila</groupId>
           <artifactId>license-maven-plugin</artifactId>
-          <version>4.6</version>
+          <version>${license-maven-plugin.version}</version>
           <configuration>
             <header>${project.basedir}/../header.txt</header>
             <strictCheck>true</strictCheck>
@@ -331,6 +332,9 @@
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>versions-maven-plugin</artifactId>
           <version>2.21.0</version>
+          <configuration>
+            <allowMajorUpdates>false</allowMajorUpdates>
+          </configuration>
         </plugin>
         <plugin>
           <groupId>com.github.spotbugs</groupId>
@@ -344,7 +348,7 @@
         <plugin>
           <groupId>org.sonatype.central</groupId>
           <artifactId>central-publishing-maven-plugin</artifactId>
-          <version>0.10.0</version>
+          <version>0.11.0</version>
           <extensions>true</extensions>
           <configuration>
             <autoPublish>false</autoPublish>
@@ -521,13 +525,22 @@
         <module>module-test</module>
       </modules>
     </profile>
+    <profile>
+      <id>java-11</id>
+      <activation>
+        <jdk>[11,</jdk>
+      </activation>
+      <properties>
+        <license-maven-plugin.version>5.1.1</license-maven-plugin.version>
+      </properties>
+    </profile>
     <profile>
       <id>java-17</id>
       <activation>
         <jdk>[17,</jdk>
       </activation>
       <properties>
-        <junit5.version>6.0.2</junit5.version>
+        <junit5.version>6.1.2</junit5.version>
       </properties>
     </profile>
     <profile>


=====================================
tck-android/pom.xml
=====================================
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.objenesis</groupId>
     <artifactId>objenesis-parent</artifactId>
-    <version>3.5</version>
+    <version>3.6</version>
   </parent>
   <artifactId>objenesis-tck-android</artifactId>
   <name>Objenesis Android TCK</name>


=====================================
tck/pom.xml
=====================================
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.objenesis</groupId>
     <artifactId>objenesis-parent</artifactId>
-    <version>3.5</version>
+    <version>3.6</version>
   </parent>
   <artifactId>objenesis-tck</artifactId>
 


=====================================
test/pom.xml
=====================================
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.objenesis</groupId>
     <artifactId>objenesis-parent</artifactId>
-    <version>3.5</version>
+    <version>3.6</version>
   </parent>
   <artifactId>objenesis-test</artifactId>
 


=====================================
website/pom.xml
=====================================
@@ -21,14 +21,14 @@
   <parent>
     <groupId>org.objenesis</groupId>
     <artifactId>objenesis-parent</artifactId>
-    <version>3.5</version>
+    <version>3.6</version>
   </parent>
   <artifactId>objenesis-website</artifactId>
   <name>Objenesis website</name>
   <packaging>pom</packaging>
 
   <!-- CHANGE THIS VERSION TO WHAT YOU NEED -->
-  <version>3.5</version>
+  <version>3.6</version>
 
   <properties>
     <javadoc>apidocs</javadoc>


=====================================
website/site/content/notes.html
=====================================
@@ -21,6 +21,28 @@
 </head>
 <body>
 
+<h1>Version 3.6 (2026-08-02)</h1>
+
+<ul>
+  <li>Build on Java 26</li>
+  <li>Fix a caching issue when objenesis is on a parent class loader</li>
+  <li>Bump actions/checkout from 7.0.0 to 7.0.1 (#514)</li>
+  <li>Bump actions/github-script from 8 to 9 (#494)</li>
+  <li>Bump actions/setup-java from 5.5.0 to 5.6.0 (#513)</li>
+  <li>Bump com.github.spotbugs:spotbugs-maven-plugin from 4.10.2.0 to 4.10.3.0 (#512)</li>
+  <li>Bump com.mycila:license-maven-plugin from 4.6 to 5.1.1 (#515)</li>
+  <li>Bump net.bytebuddy:byte-buddy from 1.18.10 to 1.18.11 (#509)</li>
+  <li>Bump org.apache.maven.plugins:maven-compiler-plugin from 3.14.1 to 3.15.0 (#483)</li>
+  <li>Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.6.2 to 3.6.3 (#496)</li>
+  <li>Bump org.apache.maven.plugins:maven-jar-plugin from 3.5.0 to 3.5.1 (#517)</li>
+  <li>Bump org.apache.maven.plugins:maven-resources-plugin from 3.4.0 to 3.5.0 (#489)</li>
+  <li>Bump org.apache.maven.plugins:maven-shade-plugin from 3.6.1 to 3.6.2 (#490)</li>
+  <li>Bump org.apache.maven.plugins:maven-site-plugin from 3.21.0 to 3.22.0 (#498)</li>
+  <li>Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.5 to 3.5.6 (#499)</li>
+  <li>Bump org.gaul:modernizer-maven-plugin from 3.4.0 to 3.5.0 (#516)</li>
+  <li>Bump org.sonatype.central:central-publishing-maven-plugin from 0.10.0 to 0.11.0 (#505)</li>
+</ul>
+
 <h1>Version 3.5 (2026-01-22)</h1>
 
 <ul>



View it on GitLab: https://salsa.debian.org/java-team/objenesis/-/compare/9f5775cb1b57ab577c9e21ac6e17f4136152839c...a191dbbfce04f65138f3f90a6d5ede678bf6b289

-- 
View it on GitLab: https://salsa.debian.org/java-team/objenesis/-/compare/9f5775cb1b57ab577c9e21ac6e17f4136152839c...a191dbbfce04f65138f3f90a6d5ede678bf6b289
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/20260918/c05110d8/attachment.htm>


More information about the pkg-java-commits mailing list