8172411: -XDnoModules must be removed
authorjlahoda
Mon, 09 Jan 2017 16:44:45 +0100
changeset 43131 7769e4891d5e
parent 43040 ab2c8b03c328
child 43132 6a5c69926e60
8172411: -XDnoModules must be removed Reviewed-by: jjg
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java	Wed Jul 05 22:40:29 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java	Mon Jan 09 16:44:45 2017 +0100
@@ -61,7 +61,6 @@
 import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.util.Name;
 import com.sun.tools.javac.util.Names;
-import com.sun.tools.javac.util.Options;
 
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Kinds.Kind.*;
@@ -469,9 +468,7 @@
         scope.enter(errSymbol);
 
         Source source = Source.instance(context);
-        Options options = Options.instance(context);
-        boolean noModules = options.isSet("noModules");
-        if (source.allowModules() && !noModules) {
+        if (source.allowModules()) {
             java_base = enterModule(names.java_base);
             //avoid completing java.base during the Symtab initialization
             java_base.completer = Completer.NULL_COMPLETER;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Wed Jul 05 22:40:29 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Mon Jan 09 16:44:45 2017 +0100
@@ -98,8 +98,6 @@
     private final boolean compactMethodDiags;
     final EnumSet<VerboseResolutionMode> verboseResolutionMode;
 
-    private final boolean checkModuleAccess;
-
     WriteableScope polymorphicSignatureScope;
 
     protected Resolve(Context context) {
@@ -135,10 +133,6 @@
         inapplicableMethodException = new InapplicableMethodException(diags);
 
         allowModules = source.allowModules();
-
-        // The following is required, for now, to support building
-        // Swing beaninfo via javadoc.
-        checkModuleAccess = !options.isSet("noModules");
     }
 
     /** error symbols, which are returned when resolution fails
@@ -322,7 +316,7 @@
                 break;
             case PUBLIC:
                 isAccessible = true;
-                if (allowModules && checkModuleAccess) {
+                if (allowModules) {
                     ModuleSymbol currModule = env.toplevel.modle;
                     currModule.complete();
                     PackageSymbol p = c.packge();
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Wed Jul 05 22:40:29 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Mon Jan 09 16:44:45 2017 +0100
@@ -681,7 +681,7 @@
         if (sep == -1) {
             msym = modules.getDefaultModule();
             typeName = name;
-        } else if (source.allowModules() && !options.isSet("noModules")) {
+        } else if (source.allowModules()) {
             Name modName = names.fromString(name.substring(0, sep));
 
             msym = moduleFinder.findModule(modName);
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Wed Jul 05 22:40:29 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Mon Jan 09 16:44:45 2017 +0100
@@ -230,7 +230,7 @@
         chk = Check.instance(context);
         initProcessorLoader();
 
-        allowModules = source.allowModules() && options.isUnset("noModules");
+        allowModules = source.allowModules();
     }
 
     public void setProcessors(Iterable<? extends Processor> processors) {