Skip to content

Commit a023b93

Browse files
author
Roger Riggs
committedOct 27, 2020
8255394: jdk/test/lib/hexdump/ASN1FormatterTest.java fails with ---illegal-access=deny
Reviewed-by: alanb, weijun
1 parent 84e985d commit a023b93

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed
 

‎test/lib-test/jdk/test/lib/hexdump/ASN1FormatterTest.java

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
/*
4040
* @test
4141
* @summary ASN.1 formatting
42+
* @modules java.base/sun.security.util
4243
* @library /test/lib
4344
* @compile ASN1FormatterTest.java
4445
* @run testng jdk.test.lib.hexdump.ASN1FormatterTest

‎test/lib/jdk/test/lib/hexdump/ASN1Formatter.java

-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ private static String oidName(byte[] bytes) {
412412
// Look up the OID; if the class is not accessible just return the numeric form
413413
Class<?> cl = Class.forName("sun.security.util.KnownOIDs");
414414
Method findMatch = cl.getDeclaredMethod("findMatch", String.class);
415-
findMatch.setAccessible(true);
416415
Object oid = findMatch.invoke(null, noid);
417416
return (oid == null) ? noid : noid + " (" + oid.toString() + ")";
418417
} catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {

0 commit comments

Comments
 (0)
Failed to load comments.