You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ga...@apache.org on 2024/10/09 19:31:56 UTC
(jclouds) 03/04: Skip test incompatible with Java 21
This is an automated email from the ASF dual-hosted git repository.
gaul pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jclouds.git
commit ed0604a08e0270234a4f760c713bbf99a8eead20
Author: Andrew Gaul <an...@gaul.org>
AuthorDate: Wed Oct 9 12:18:47 2024 -0700
Skip test incompatible with Java 21
---
.../java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/core/src/test/java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java b/core/src/test/java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java
index b16b77dfe4..944a163298 100644
--- a/core/src/test/java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java
+++ b/core/src/test/java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java
@@ -25,6 +25,7 @@ import java.lang.reflect.Method;
import java.lang.reflect.ReflectPermission;
import org.easymock.IAnswer;
+import org.testng.SkipException;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -70,7 +71,12 @@ public class Reflection2CoreJavaClassesTest {
}
});
replay(mockSecurityManager);
- System.setSecurityManager(mockSecurityManager);
+ try {
+ System.setSecurityManager(mockSecurityManager);
+ } catch (UnsupportedOperationException uoe) {
+ throw new SkipException("Not compatible with Java 21", uoe);
+ }
+
securityManagerOverridden = true;
methods(Enum.class);
}