karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1421685 - /karaf/trunk/main/src/main/java/org/apache/karaf/main/InstanceHelper.java
Date Fri, 14 Dec 2012 06:19:23 GMT
Author: ffang
Date: Fri Dec 14 06:19:22 2012
New Revision: 1421685

URL: http://svn.apache.org/viewvc?rev=1421685&view=rev
Log:
[KARAF-2058]add NPE guard

Modified:
    karaf/trunk/main/src/main/java/org/apache/karaf/main/InstanceHelper.java

Modified: karaf/trunk/main/src/main/java/org/apache/karaf/main/InstanceHelper.java
URL: http://svn.apache.org/viewvc/karaf/trunk/main/src/main/java/org/apache/karaf/main/InstanceHelper.java?rev=1421685&r1=1421684&r2=1421685&view=diff
==============================================================================
--- karaf/trunk/main/src/main/java/org/apache/karaf/main/InstanceHelper.java (original)
+++ karaf/trunk/main/src/main/java/org/apache/karaf/main/InstanceHelper.java Fri Dec 14 06:19:22
2012
@@ -65,7 +65,7 @@ public class InstanceHelper {
                             //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);
                             }
                         }



Mime
View raw message