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.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 @@ public class Symtab {
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;

View File

@ -98,8 +98,6 @@ public class Resolve {
private final boolean compactMethodDiags;
final EnumSet<VerboseResolutionMode> verboseResolutionMode;
private final boolean checkModuleAccess;
WriteableScope polymorphicSignatureScope;
protected Resolve(Context context) {
@ -135,10 +133,6 @@ public class Resolve {
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 @@ public class Resolve {
break;
case PUBLIC:
isAccessible = true;
if (allowModules && checkModuleAccess) {
if (allowModules) {
ModuleSymbol currModule = env.toplevel.modle;
currModule.complete();
PackageSymbol p = c.packge();

View File

@ -681,7 +681,7 @@ public class JavaCompiler {
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);

View File

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