src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java
changeset 48054 702043a4cdeb
parent 47216 71c04702a3d5
child 49197 cc2673fa8c20
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Mon Dec 04 10:13:58 2017 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Mon Dec 04 17:54:49 2017 +0000
@@ -52,6 +52,7 @@
 import com.sun.tools.javac.api.MultiTaskListener;
 import com.sun.tools.javac.code.*;
 import com.sun.tools.javac.code.Lint.LintCategory;
+import com.sun.tools.javac.code.Source.Feature;
 import com.sun.tools.javac.code.Symbol.ClassSymbol;
 import com.sun.tools.javac.code.Symbol.CompletionFailure;
 import com.sun.tools.javac.code.Symbol.PackageSymbol;
@@ -684,7 +685,7 @@
         if (sep == -1) {
             msym = modules.getDefaultModule();
             typeName = name;
-        } else if (source.allowModules()) {
+        } else if (Feature.MODULES.allowedInSource(source)) {
             Name modName = names.fromString(name.substring(0, sep));
 
             msym = moduleFinder.findModule(modName);
@@ -1544,7 +1545,7 @@
             env.tree = transTypes.translateTopLevelClass(env.tree, localMake);
             compileStates.put(env, CompileState.TRANSTYPES);
 
-            if (source.allowLambda() && scanner.hasLambdas) {
+            if (Feature.LAMBDA.allowedInSource(source) && scanner.hasLambdas) {
                 if (shouldStop(CompileState.UNLAMBDA))
                     return;