[Git][java-team/gradle][master] 2 commits: * d/p/java25-compat.patch: catch exception when setting
Pierre Gruet (@pgt)
gitlab at salsa.debian.org
Sun Mar 29 20:13:14 BST 2026
Pierre Gruet pushed to branch master at Debian Java Maintainers / gradle
Commits:
8b065793 by Vladimir Petko at 2026-02-11T08:22:57+13:00
* d/p/java25-compat.patch: catch exception when setting
Security Manager (Closes: #1108566).
- - - - -
18cda1ca by Vladimir Petko at 2026-02-11T08:23:01+13:00
changelog
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/java25-compat.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+gradle (4.4.1-23) UNRELEASED; urgency=medium
+
+ * d/p/java25-compat.patch: catch exception when clearing
+ Security Manager (Closes: #1108566).
+
+ -- Vladimir Petko <vladimir.petko at canonical.com> Thu, 20 Nov 2025 16:21:07 +1300
+
gradle (4.4.1-22) unstable; urgency=medium
* Team upload.
=====================================
debian/patches/java25-compat.patch
=====================================
@@ -0,0 +1,39 @@
+Description: Catch exception when clearing Security Manager
+ Java 25 disables setting Security Manager. The class may be removed in
+ the future releases.
+ The patch is not needed upstream, as Gradle 9.x is compatible
+ with Java 25.
+Author: Vladimir Petko <vladimir.petko at canonical.com>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1108566
+Forwarded: not-needed
+Last-Update: 2025-02-11
+
+--- a/subprojects/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/worker/TestWorker.java
++++ b/subprojects/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/worker/TestWorker.java
+@@ -73,11 +75,25 @@
+ } finally {
+ LOGGER.info("{} finished executing tests.", workerProcessContext.getDisplayName());
+ // Clean out any security manager the tests might have installed
+- System.setSecurityManager(null);
++ clearSecurityManager();
+ testServices.close();
+ }
+ }
+
++ private static boolean canClearSecurityManager = true;
++ @SuppressWarnings("removal")
++ private static void clearSecurityManager() {
++ if (!canClearSecurityManager) {
++ return;
++ }
++ try {
++ System.setSecurityManager(null);
++ }
++ catch (Throwable t) {
++ canClearSecurityManager = false;
++ }
++ }
++
+ private void startReceivingTests(WorkerProcessContext workerProcessContext, ServiceRegistry testServices) {
+ TestClassProcessor targetProcessor = factory.create(testServices);
+ IdGenerator<Object> idGenerator = testServices.get(IdGenerator.class);
=====================================
debian/patches/series
=====================================
@@ -41,3 +41,4 @@ java17-compatibility.patch
auto-adjust-language-level.patch
CVE-2019-16370.patch
type-inference-fix.patch
+java25-compat.patch
View it on GitLab: https://salsa.debian.org/java-team/gradle/-/compare/8acf4531264d6f9bcccb0d8fb413eb55c955f112...18cda1ca79bb46ac9798d102e46dd28ac82bc5be
--
View it on GitLab: https://salsa.debian.org/java-team/gradle/-/compare/8acf4531264d6f9bcccb0d8fb413eb55c955f112...18cda1ca79bb46ac9798d102e46dd28ac82bc5be
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20260329/50badb30/attachment.htm>
More information about the pkg-java-commits
mailing list