Skip to content
Browse files

[KARAF-2058]add NPE guard

git-svn-id: https://svn.apache.org/repos/asf/karaf/trunk@1421685 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 2f0af31 commit a5ab55af9ca90de1f286590a42bd6c4451ee3d47 @ffang ffang committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 main/src/main/java/org/apache/karaf/main/InstanceHelper.java
View
2 main/src/main/java/org/apache/karaf/main/InstanceHelper.java
@@ -65,7 +65,7 @@ static void updateInstancePid(File karafHome, File karafBase) {
//looking for root instance entry
String name = props.getProperty("item." + i + ".name");
boolean root = Boolean.parseBoolean(props.getProperty("item." + i + ".root", "false"));
- if (root && !name.equals(instanceName)) {
+ if (name != null && root && !name.equals(instanceName)) {
props.setProperty("item." + i + ".name", instanceName);
}
}

0 comments on commit a5ab55a

Please sign in to comment.
Something went wrong with that request. Please try again.