Skip to content

Commit

Permalink
Merge pull request #6142 from arsenalzp/WFCORE-6722_standardize_error…
Browse files Browse the repository at this point in the history
…s_messages

[WFCORE-6722] Standardize the error message shown when the server is launched with an valid but empty option
  • Loading branch information
yersan authored Aug 27, 2024
2 parents 6437f95 + e8e9434 commit bdf2696
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/src/main/java/org/jboss/as/server/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public static ServerEnvironmentWrapper determineEnvironment(String[] args, Prope

int idx = arg.indexOf('=');
if (idx == arg.length() - 1) {
STDERR.println(ServerLogger.ROOT_LOGGER.noArgValue(arg));
STDERR.println(ServerLogger.ROOT_LOGGER.valueExpectedForCommandLineOption(arg));
usage(productConfig);
return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR);
}
Expand Down Expand Up @@ -272,7 +272,7 @@ public static ServerEnvironmentWrapper determineEnvironment(String[] args, Prope
startModeSet = true;
int idx = arg.indexOf('=');
if (idx == arg.length() - 1) {
STDERR.println(ServerLogger.ROOT_LOGGER.noArgValue(arg));
STDERR.println(ServerLogger.ROOT_LOGGER.valueExpectedForCommandLineOption(arg));
usage(productConfig);
return new ServerEnvironmentWrapper(ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR);
}
Expand All @@ -295,7 +295,7 @@ public static ServerEnvironmentWrapper determineEnvironment(String[] args, Prope
} else if (arg.startsWith(CommandLineConstants.GRACEFUL_STARTUP)) {
int idx = arg.indexOf('=');
if (idx == arg.length() - 1) {
STDERR.println(ServerLogger.ROOT_LOGGER.noArgValue(arg));
STDERR.println(ServerLogger.ROOT_LOGGER.valueExpectedForCommandLineOption(arg));
usage(productConfig);
return new ServerEnvironmentWrapper(ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR);
}
Expand Down

0 comments on commit bdf2696

Please sign in to comment.