mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
update SystemPropertyCommand message.
This commit is contained in:
+4
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user