[9] RFR 8157489: AppleProvider in java.base/macosx/classes/module-info.java.extra

Mandy Chung mandy.chung at oracle.com
Fri Jun 10 01:15:59 UTC 2016



> On Jun 9, 2016, at 5:26 PM, Valerie Peng <valerie.peng at oracle.com> wrote:
> 
> Webrev updated at: http://cr.openjdk.java.net/~valeriep/8157489/webrev.01
> 


  51             if (!pClass.getModule().getName().equals("java.base")) {

You can check if Module object is Object.class.getModule() instead of checking the module name.

Since you expect no provider from java.base, the test should detect that e.g.

if (pClass.getModule() == Object.class.getModule())
    throw new RuntimeException(…);

Otherwise, looks okay.

Mandy


More information about the security-dev mailing list