8255394: jdk/test/lib/hexdump/ASN1FormatterTest.java fails with ---illegal-access=deny
Reviewed-by: alanb, weijun
This commit is contained in:
parent
84e985da4b
commit
a023b93712
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user