Author: taher
Date: Thu May 26 09:33:46 2016
New Revision: 1745584
URL:
http://svn.apache.org/viewvc?rev=1745584&view=revLog:
move validation logic to its correct place in StartupCommandUtil OFBIZ-6783
Modified:
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java?rev=1745584&r1=1745583&r2=1745584&view=diff==============================================================================
--- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java (original)
+++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java Thu May 26 09:33:46 2016
@@ -178,9 +178,6 @@ final class StartupCommandUtil {
} catch (ParseException e) {
throw new StartupException(e.getMessage());
}
- if(!commandLine.getArgList().isEmpty()) {
- throw new StartupException("unrecognized options / properties: " + commandLine.getArgList());
- }
validateAllCommandArguments(commandLine);
return mapCommonsCliOptionsToStartupCommands(commandLine);
}
@@ -268,6 +265,10 @@ final class StartupCommandUtil {
}
private static final void validateAllCommandArguments(CommandLine commandLine) throws StartupException {
+ // Make sure no extra options are passed
+ if(!commandLine.getArgList().isEmpty()) {
+ throw new StartupException("unrecognized options / properties: " + commandLine.getArgList());
+ }
// TEST_LIST validation
if(commandLine.hasOption(StartupOption.TEST_LIST.getName())) {
Properties optionProperties = commandLine.getOptionProperties(StartupOption.TEST_LIST.getName());