8170692: inconsistent check of module-related options against target version
Reviewed-by: jjg
--- 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)) {