RFR: 8157474: clean up/simplify/rename ModuleWrappers class

Mandy Chung mandy.chung at oracle.com
Fri May 20 23:20:52 UTC 2016

> On May 20, 2016, at 1:54 PM, Jonathan Gibbons <jonathan.gibbons at oracle.com> wrote:
> Please review this change to simplify and rename the javac ModuleWrappers class.
> There is no deliberate change in functionality.
> JBS: https://bugs.openjdk.java.net/browse/JDK-8157474
> Webrev: http://cr.openjdk.java.net/~jjg/8157474/webrev.00/

Looks fine.  Nits:

  58     public static final class ServiceLoaderHelper {

You have a good convention to name the helper class same as the JDK 9 class name.  Should this ServiceLoaderHelper one be renamed to “ServiceLoader” too?

On this Class::forName call:
 123                     moduleFinderClass = Class.forName("java.lang.module.ModuleFinder", false, ClassLoader.getSystemClassLoader());

It’s okay to use ClassLoader.getSystemClassLoader() for delegation.  Since the classes are in java.base, it’s safe to always pass null loader.  It’s nit.


More information about the compiler-dev mailing list