Details
-
Bug
-
Resolution: Fixed
-
P3
-
16
-
b22
Description
This test fails when run with --illegal-access=deny.
java.lang.reflect.InaccessibleObjectException: Unable to make public static sun.security.util.KnownOIDs sun.security.util.KnownOIDs.findMatch(java.lang.String) accessible: module java.base does not "exports sun.security.util" to unnamed module @7efb1695
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:196)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:190)
at jdk.test.lib.hexdump.ASN1Formatter.oidName(ASN1Formatter.java:415)
at jdk.test.lib.hexdump.ASN1Formatter.annotate(ASN1Formatter.java:230)
at jdk.test.lib.hexdump.ASN1Formatter.annotate(ASN1Formatter.java:313)
at jdk.test.lib.hexdump.ASN1Formatter.annotate(ASN1Formatter.java:313)
at jdk.test.lib.hexdump.ASN1Formatter.annotate(ASN1Formatter.java:313)
at jdk.test.lib.hexdump.ASN1Formatter.annotate(ASN1Formatter.java:133)
at jdk.test.lib.hexdump.HexPrinter$AnnotationWriter.flush(HexPrinter.java:1026)
at jdk.test.lib.hexdump.HexPrinter.toString(HexPrinter.java:535)
at jdk.test.lib.hexdump.ASN1FormatterTest.dumpPEM(ASN1FormatterTest.java:91)
diff --git a/test/lib-test/jdk/test/lib/hexdump/ASN1FormatterTest.java b/test/lib-test/jdk/test/lib/hexdump/ASN1FormatterTest.java
index 01887fa8baa..ac8d229c3c2 100644
--- a/test/lib-test/jdk/test/lib/hexdump/ASN1FormatterTest.java
+++ b/test/lib-test/jdk/test/lib/hexdump/ASN1FormatterTest.java
@@ -39,6 +39,7 @@ import static org.testng.Assert.*;
/*
* @test
* @summary ASN.1 formatting
+ * @modules java.base/sun.security.util:open
* @library /test/lib
* @compile ASN1FormatterTest.java
* @run testng jdk.test.lib.hexdump.ASN1FormatterTest
java.lang.reflect.InaccessibleObjectException: Unable to make public static sun.security.util.KnownOIDs sun.security.util.KnownOIDs.findMatch(java.lang.String) accessible: module java.base does not "exports sun.security.util" to unnamed module @7efb1695
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:196)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:190)
at jdk.test.lib.hexdump.ASN1Formatter.oidName(ASN1Formatter.java:415)
at jdk.test.lib.hexdump.ASN1Formatter.annotate(ASN1Formatter.java:230)
at jdk.test.lib.hexdump.ASN1Formatter.annotate(ASN1Formatter.java:313)
at jdk.test.lib.hexdump.ASN1Formatter.annotate(ASN1Formatter.java:313)
at jdk.test.lib.hexdump.ASN1Formatter.annotate(ASN1Formatter.java:313)
at jdk.test.lib.hexdump.ASN1Formatter.annotate(ASN1Formatter.java:133)
at jdk.test.lib.hexdump.HexPrinter$AnnotationWriter.flush(HexPrinter.java:1026)
at jdk.test.lib.hexdump.HexPrinter.toString(HexPrinter.java:535)
at jdk.test.lib.hexdump.ASN1FormatterTest.dumpPEM(ASN1FormatterTest.java:91)
diff --git a/test/lib-test/jdk/test/lib/hexdump/ASN1FormatterTest.java b/test/lib-test/jdk/test/lib/hexdump/ASN1FormatterTest.java
index 01887fa8baa..ac8d229c3c2 100644
--- a/test/lib-test/jdk/test/lib/hexdump/ASN1FormatterTest.java
+++ b/test/lib-test/jdk/test/lib/hexdump/ASN1FormatterTest.java
@@ -39,6 +39,7 @@ import static org.testng.Assert.*;
/*
* @test
* @summary ASN.1 formatting
+ * @modules java.base/sun.security.util:open
* @library /test/lib
* @compile ASN1FormatterTest.java
* @run testng jdk.test.lib.hexdump.ASN1FormatterTest