karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r1546593 - /karaf/trunk/service/guard/src/main/java/org/apache/karaf/service/guard/tools/ACLConfigurationParser.java
Date Fri, 29 Nov 2013 16:07:49 GMT
Author: jbonofre
Date: Fri Nov 29 16:07:48 2013
New Revision: 1546593

URL: http://svn.apache.org/r1546593
Log:
Prevent NPE in Guard ACLConfigurationParser when an argument is null

Modified:
    karaf/trunk/service/guard/src/main/java/org/apache/karaf/service/guard/tools/ACLConfigurationParser.java

Modified: karaf/trunk/service/guard/src/main/java/org/apache/karaf/service/guard/tools/ACLConfigurationParser.java
URL: http://svn.apache.org/viewvc/karaf/trunk/service/guard/src/main/java/org/apache/karaf/service/guard/tools/ACLConfigurationParser.java?rev=1546593&r1=1546592&r2=1546593&view=diff
==============================================================================
--- karaf/trunk/service/guard/src/main/java/org/apache/karaf/service/guard/tools/ACLConfigurationParser.java
(original)
+++ karaf/trunk/service/guard/src/main/java/org/apache/karaf/service/guard/tools/ACLConfigurationParser.java
Fri Nov 29 16:07:48 2013
@@ -202,7 +202,8 @@ public class ACLConfigurationParser {
             else
                 sb.append(',');
             sb.append('"');
-            sb.append(param.toString().trim());
+            if (param != null)
+                sb.append(param.toString().trim());
             sb.append('"');
         }
         sb.append(']');
@@ -295,6 +296,8 @@ public class ACLConfigurationParser {
             return false;
 
         for (int i = 0; i < regexArgs.size(); i++) {
+            if (params[i] == null)
+                return false;
             if (!params[i].toString().trim().matches(regexArgs.get(i))) {
                 return false;
             }



Mime
View raw message