8255394: jdk/test/lib/hexdump/ASN1FormatterTest.java fails with ---illegal-access=deny

Reviewed-by: alanb, weijun
This commit is contained in:
Roger Riggs 2020-10-27 18:17:57 +00:00
parent 84e985da4b
commit a023b93712
2 changed files with 1 additions and 1 deletions

View File

@ -39,6 +39,7 @@ import static org.testng.Assert.*;
/*
* @test
* @summary ASN.1 formatting
* @modules java.base/sun.security.util
* @library /test/lib
* @compile ASN1FormatterTest.java
* @run testng jdk.test.lib.hexdump.ASN1FormatterTest

View File

@ -412,7 +412,6 @@ public class ASN1Formatter implements HexPrinter.Formatter {
// Look up the OID; if the class is not accessible just return the numeric form
Class<?> cl = Class.forName("sun.security.util.KnownOIDs");
Method findMatch = cl.getDeclaredMethod("findMatch", String.class);
findMatch.setAccessible(true);
Object oid = findMatch.invoke(null, noid);
return (oid == null) ? noid : noid + " (" + oid.toString() + ")";
} catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {