incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1200714 - /sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/AnonymousAccessConfigServlet.java
Date Fri, 11 Nov 2011 03:00:39 GMT
Author: justin
Date: Fri Nov 11 03:00:39 2011
New Revision: 1200714

URL: http://svn.apache.org/viewvc?rev=1200714&view=rev
Log:
SLING-2274 - fixing NPE in integration test

Modified:
    sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/AnonymousAccessConfigServlet.java

Modified: sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/AnonymousAccessConfigServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/AnonymousAccessConfigServlet.java?rev=1200714&r1=1200713&r2=1200714&view=diff
==============================================================================
--- sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/AnonymousAccessConfigServlet.java
(original)
+++ sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/AnonymousAccessConfigServlet.java
Fri Nov 11 03:00:39 2011
@@ -18,6 +18,7 @@ package org.apache.sling.launchpad.tests
 
 import java.io.IOException;
 import java.util.Dictionary;
+import java.util.Hashtable;
 
 import javax.servlet.ServletException;
 
@@ -69,6 +70,9 @@ public class AnonymousAccessConfigServle
             int existingModifiedCounter = modifiedCounter;
             Configuration config = configAdmin.getConfiguration(AUTH_PID);
             Dictionary props = config.getProperties();
+            if (props == null) {
+                props = new Hashtable();
+            }
             props.put(PROP_AUTH_ANNONYMOUS, Boolean.FALSE);
             config.update(props);
             waitForModified(existingModifiedCounter, TIMEOUT);
@@ -76,6 +80,9 @@ public class AnonymousAccessConfigServle
             int existingModifiedCounter = modifiedCounter;
             Configuration config = configAdmin.getConfiguration(AUTH_PID);
             Dictionary props = config.getProperties();
+            if (props == null) {
+                props = new Hashtable();
+            }
             props.put(PROP_AUTH_ANNONYMOUS, Boolean.TRUE);
             config.update(props);
             waitForModified(existingModifiedCounter, TIMEOUT);



Mime
View raw message