update SystemPropertyCommand message.

This commit is contained in:
hengyunabc
2019-09-03 16:01:51 +08:00
parent 89a61ff18b
commit 5dc091d38b
@@ -44,6 +44,7 @@ public class SystemPropertyCommand extends AnnotatedCommand {
@Override
public void process(CommandProcess process) {
int status = 0;
try {
if (StringUtils.isBlank(propertyName) && StringUtils.isBlank(propertyValue)) {
// show all system properties
@@ -52,7 +53,7 @@ public class SystemPropertyCommand extends AnnotatedCommand {
// view the specified system property
String value = System.getProperty(propertyName);
if (value == null) {
process.write("In order to change the system properties, you must specify the property value.\n");
process.write("There is no property with the key " + propertyName + ".\n");
} else {
process.write(propertyName + "=" + value + "\n");
}
@@ -64,8 +65,9 @@ public class SystemPropertyCommand extends AnnotatedCommand {
}
} catch (Throwable t) {
process.write("Error during setting system property: " + t.getMessage() + "\n");
status = 1;
} finally {
process.end();
process.end(status);
}
}