Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit ed0604a

Browse files
committed
Skip test incompatible with Java 21
1 parent 89e834a commit ed0604a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/src/test/java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.lang.reflect.ReflectPermission;
2626

2727
import org.easymock.IAnswer;
28+
import org.testng.SkipException;
2829
import org.testng.annotations.AfterClass;
2930
import org.testng.annotations.BeforeClass;
3031
import org.testng.annotations.Test;
@@ -70,7 +71,12 @@ public Void answer() throws Throwable {
7071
}
7172
});
7273
replay(mockSecurityManager);
73-
System.setSecurityManager(mockSecurityManager);
74+
try {
75+
System.setSecurityManager(mockSecurityManager);
76+
} catch (UnsupportedOperationException uoe) {
77+
throw new SkipException("Not compatible with Java 21", uoe);
78+
}
79+
7480
securityManagerOverridden = true;
7581
methods(Enum.class);
7682
}

0 commit comments

Comments
 (0)