8172411: -XDnoModules must be removed

Reviewed-by: jjg
This commit is contained in:
Jan Lahoda 2017-01-09 16:44:45 +01:00
parent 6182483d53
commit 869f5bbd91
4 changed files with 4 additions and 13 deletions

View File

@ -61,7 +61,6 @@ import com.sun.tools.javac.util.JavacMessages;
import com.sun.tools.javac.util.List; import com.sun.tools.javac.util.List;
import com.sun.tools.javac.util.Name; import com.sun.tools.javac.util.Name;
import com.sun.tools.javac.util.Names; 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.Flags.*;
import static com.sun.tools.javac.code.Kinds.Kind.*; import static com.sun.tools.javac.code.Kinds.Kind.*;
@ -469,9 +468,7 @@ public class Symtab {
scope.enter(errSymbol); scope.enter(errSymbol);
Source source = Source.instance(context); Source source = Source.instance(context);
Options options = Options.instance(context); if (source.allowModules()) {
boolean noModules = options.isSet("noModules");
if (source.allowModules() && !noModules) {
java_base = enterModule(names.java_base); java_base = enterModule(names.java_base);
//avoid completing java.base during the Symtab initialization //avoid completing java.base during the Symtab initialization
java_base.completer = Completer.NULL_COMPLETER; java_base.completer = Completer.NULL_COMPLETER;

View File

@ -98,8 +98,6 @@ public class Resolve {
private final boolean compactMethodDiags; private final boolean compactMethodDiags;
final EnumSet<VerboseResolutionMode> verboseResolutionMode; final EnumSet<VerboseResolutionMode> verboseResolutionMode;
private final boolean checkModuleAccess;
WriteableScope polymorphicSignatureScope; WriteableScope polymorphicSignatureScope;
protected Resolve(Context context) { protected Resolve(Context context) {
@ -135,10 +133,6 @@ public class Resolve {
inapplicableMethodException = new InapplicableMethodException(diags); inapplicableMethodException = new InapplicableMethodException(diags);
allowModules = source.allowModules(); 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 /** error symbols, which are returned when resolution fails
@ -322,7 +316,7 @@ public class Resolve {
break; break;
case PUBLIC: case PUBLIC:
isAccessible = true; isAccessible = true;
if (allowModules && checkModuleAccess) { if (allowModules) {
ModuleSymbol currModule = env.toplevel.modle; ModuleSymbol currModule = env.toplevel.modle;
currModule.complete(); currModule.complete();
PackageSymbol p = c.packge(); PackageSymbol p = c.packge();

View File

@ -681,7 +681,7 @@ public class JavaCompiler {
if (sep == -1) { if (sep == -1) {
msym = modules.getDefaultModule(); msym = modules.getDefaultModule();
typeName = name; typeName = name;
} else if (source.allowModules() && !options.isSet("noModules")) { } else if (source.allowModules()) {
Name modName = names.fromString(name.substring(0, sep)); Name modName = names.fromString(name.substring(0, sep));
msym = moduleFinder.findModule(modName); msym = moduleFinder.findModule(modName);

View File

@ -230,7 +230,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
chk = Check.instance(context); chk = Check.instance(context);
initProcessorLoader(); initProcessorLoader();
allowModules = source.allowModules() && options.isUnset("noModules"); allowModules = source.allowModules();
} }
public void setProcessors(Iterable<? extends Processor> processors) { public void setProcessors(Iterable<? extends Processor> processors) {