diff --git a/src/test/java/org/apache/commons/logging/security/SecurityAllowedTestCase.java b/src/test/java/org/apache/commons/logging/security/SecurityAllowedTestCase.java index cfd873f..52cea40 100644 --- a/src/test/java/org/apache/commons/logging/security/SecurityAllowedTestCase.java +++ b/src/test/java/org/apache/commons/logging/security/SecurityAllowedTestCase.java @@ -80,6 +80,7 @@ public class SecurityAllowedTestCase extends TestCase { public void tearDown() { // Restore, so other tests don't get stuffed up if a test // sets a custom security manager. + // Java 22: java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release System.setSecurityManager(oldSecMgr); } @@ -97,6 +98,7 @@ public class SecurityAllowedTestCase extends TestCase { CustomHashtable.class.getName()); final MockSecurityManager mySecurityManager = new MockSecurityManager(); mySecurityManager.addPermission(new AllPermission()); + // Java 22: java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release System.setSecurityManager(mySecurityManager); try { diff --git a/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java b/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java index 9176f2b..82a57a1 100644 --- a/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java +++ b/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java @@ -112,6 +112,7 @@ public class SecurityForbiddenTestCase extends TestCase { public void tearDown() { // Restore, so other tests don't get stuffed up if a test // sets a custom security manager. + // Java 22: java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release System.setSecurityManager(oldSecMgr); } @@ -129,7 +130,7 @@ public class SecurityForbiddenTestCase extends TestCase { LogFactory.HASHTABLE_IMPLEMENTATION_PROPERTY, CustomHashtable.class.getName()); final MockSecurityManager mySecurityManager = new MockSecurityManager(); - + // Java 22: java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release System.setSecurityManager(mySecurityManager); try { @@ -182,7 +183,7 @@ public class SecurityForbiddenTestCase extends TestCase { LogFactory.HASHTABLE_IMPLEMENTATION_PROPERTY, CustomHashtable.class.getName()); final MockSecurityManager mySecurityManager = new MockSecurityManager(); - + // Java 22: java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release System.setSecurityManager(mySecurityManager); try {