8170692: inconsistent check of module-related options against target version
authorvromero
Fri, 20 Jan 2017 08:29:59 -0800
changeset 43273 2614e1907a0b
parent 43272 421ae1e38d2d
child 43274 6b5ed4f9fb81
child 43275 b73702608fc6
8170692: inconsistent check of module-related options against target version Reviewed-by: jjg
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java	Fri Jan 20 15:32:07 2017 +0100
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java	Fri Jan 20 08:29:59 2017 -0800
@@ -588,7 +588,9 @@
         checkOptionAllowed(t.compareTo(Target.JDK1_9) >= 0,
                 option -> error("err.option.not.allowed.with.target", option.getPrimaryName(), t.name),
                 Option.MODULE_SOURCE_PATH, Option.UPGRADE_MODULE_PATH,
-                Option.SYSTEM, Option.MODULE_PATH, Option.ADD_MODULES, Option.LIMIT_MODULES,
+                Option.SYSTEM, Option.MODULE_PATH, Option.ADD_MODULES,
+                Option.ADD_EXPORTS, Option.ADD_OPENS, Option.ADD_READS,
+                Option.LIMIT_MODULES,
                 Option.PATCH_MODULE);
 
         if (fm.hasLocation(StandardLocation.MODULE_SOURCE_PATH)) {