--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ValidOptions.java Wed Feb 13 18:31:09 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ValidOptions.java Fri Feb 15 17:41:06 2019 -0500
@@ -41,6 +41,9 @@
*
* checkIfSupported(CLIOptions mode, CLIOptions arg)
* Determine if the given arg is valid in the given mode.
+ *
+ * checkIfOtherSupported(CLIOptions mode, CLIOptions arg)
+ * Determine if the given arg is valid in the a different mode.
*/
class ValidOptions {
@@ -166,4 +169,15 @@
}
return false;
}
+
+ static boolean checkIfOtherSupported(CLIOptions mode, CLIOptions arg) {
+ for (CLIOptions other : options.keySet()) {
+ if (!other.equals(mode)) {
+ if (checkIfSupported(other, arg)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
}