d/p/java25-compat.patch: catch exception when clearing security manager
This MR addresses #1108566.
Gradle sets security manager in subprojects/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/worker/TestWorker.java and subprojects/core/src/main/java/org/gradle/process/internal/worker/child/ApplicationClassesInSystemClassLoaderWorkerImplementationFactory.java:102 as a property for the worker that is less than Java 9.
We do not need to update ApplicationClassesInSystemClassLoaderWorkerImplementationFactory.java - as Java 25 will use the options file instead.
This PR updates TestWorker code to catch exception if thrown by setSecurityManager call. The patch can be updated to remove the call altogether after Java 25 migration is done.
Testing:
- Built in chroot with Java 25 default.
- Installed updated Gradle and rebuilt
xgboost-predictor-javawith Java 25 default
Edited by Vladimir Petko