karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1421686 - /karaf/branches/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/Main.java
Date Fri, 14 Dec 2012 06:21:31 GMT
Author: ffang
Date: Fri Dec 14 06:21:31 2012
New Revision: 1421686

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

Modified:
    karaf/branches/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/Main.java

Modified: karaf/branches/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/Main.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/Main.java?rev=1421686&r1=1421685&r2=1421686&view=diff
==============================================================================
--- karaf/branches/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/Main.java (original)
+++ karaf/branches/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/Main.java Fri Dec
14 06:21:31 2012
@@ -579,7 +579,7 @@ public class Main {
                             //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