From a6ce8a14faf45610446f0f683180e948ee324cec Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Wed, 14 Aug 2024 13:50:33 -0400 Subject: [PATCH] Add comments --- .../commons/logging/security/SecurityForbiddenTestCase.java | 2 ++ 1 file changed, 2 insertions(+) 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 82a57a1..2d21f13 100644 --- a/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java +++ b/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java @@ -147,6 +147,7 @@ public class SecurityForbiddenTestCase extends TestCase { // // The default is either the java Hashtable class (java < 1.2) or the // JCL WeakHashtable (java >= 1.3). + // Java 22: java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release System.setSecurityManager(oldSecMgr); final Field factoryField = c.getDeclaredField("factories"); factoryField.setAccessible(true); @@ -161,6 +162,7 @@ public class SecurityForbiddenTestCase extends TestCase { // Restore original security manager so output can be generated; the // PrintWriter constructor tries to read the line.separator // system property. + // Java 22: java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release System.setSecurityManager(oldSecMgr); final StringWriter sw = new StringWriter(); final PrintWriter pw = new PrintWriter(sw);