From 104dd099b69032ad53719139aa8f7c7c60edaeff Mon Sep 17 00:00:00 2001 From: Stian Sandvold Date: Sat, 30 May 2026 20:38:16 +0200 Subject: [PATCH] chore: remove -Xshare:off from the Surefire argLine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `-Xshare:off` was added to surefireArgLine in the Mockito 5.18 upgrade (#24006), alongside the byte-buddy startup agent. It disables Class Data Sharing — a JVM default that speeds startup — but it isn't needed: the byte-buddy agent and CDS coexist fine, since a class the inline mock maker redefines simply isn't served from the shared archive. Removing the flag restores the JVM's default (-Xshare:auto) without affecting the agent. Verified: the full test workflow is green with CDS enabled, and dhis-support-system (the inline-mock module) passes 227/0/0 locally on Java 21 with CDS on. Co-Authored-By: Claude Opus 4.8 (1M context) --- dhis-2/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dhis-2/pom.xml b/dhis-2/pom.xml index 67d5f5c2d8a3..4c2a8953bbee 100644 --- a/dhis-2/pom.xml +++ b/dhis-2/pom.xml @@ -83,7 +83,7 @@ 1.17.5 1.17.5 - -Xmx2024m -Xshare:off -javaagent:${settings.localRepository}/net/bytebuddy/byte-buddy-agent/${byte-buddy-agent.version}/byte-buddy-agent-${byte-buddy-agent.version}.jar + -Xmx2024m -javaagent:${settings.localRepository}/net/bytebuddy/byte-buddy-agent/${byte-buddy-agent.version}/byte-buddy-agent-${byte-buddy-agent.version}.jar 1.1.6 3.5.1