incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1600870 - in /sling/trunk/contrib/crankstart: core/src/main/java/org/apache/sling/crankstart/core/commands/Configure.java launcher/src/test/resources/launcher-test.crank.txt
Date Fri, 06 Jun 2014 12:39:29 GMT
Author: bdelacretaz
Date: Fri Jun  6 12:39:29 2014
New Revision: 1600870

URL: http://svn.apache.org/r1600870
Log:
Accept null properties

Modified:
    sling/trunk/contrib/crankstart/core/src/main/java/org/apache/sling/crankstart/core/commands/Configure.java
    sling/trunk/contrib/crankstart/launcher/src/test/resources/launcher-test.crank.txt

Modified: sling/trunk/contrib/crankstart/core/src/main/java/org/apache/sling/crankstart/core/commands/Configure.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/crankstart/core/src/main/java/org/apache/sling/crankstart/core/commands/Configure.java?rev=1600870&r1=1600869&r2=1600870&view=diff
==============================================================================
--- sling/trunk/contrib/crankstart/core/src/main/java/org/apache/sling/crankstart/core/commands/Configure.java
(original)
+++ sling/trunk/contrib/crankstart/core/src/main/java/org/apache/sling/crankstart/core/commands/Configure.java
Fri Jun  6 12:39:29 2014
@@ -21,6 +21,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.Dictionary;
 import java.util.Enumeration;
+import java.util.Hashtable;
 
 import org.apache.felix.cm.file.ConfigurationHandler;
 import org.apache.sling.crankstart.api.CrankstartCommand;
@@ -97,6 +98,10 @@ public class Configure implements Cranks
     @SuppressWarnings("unchecked")
     private Dictionary<String, Object> parseFelixConfig(Dictionary<String, Object>
properties) throws IOException {
         // Build a stream in Felix .config format and parse it
+        if(properties == null) {
+            return new Hashtable<String, Object>();
+        }
+        
         final StringBuilder sb = new StringBuilder();
         final Enumeration<String> keys = properties.keys();
         while(keys.hasMoreElements()) {

Modified: sling/trunk/contrib/crankstart/launcher/src/test/resources/launcher-test.crank.txt
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/crankstart/launcher/src/test/resources/launcher-test.crank.txt?rev=1600870&r1=1600869&r2=1600870&view=diff
==============================================================================
--- sling/trunk/contrib/crankstart/launcher/src/test/resources/launcher-test.crank.txt (original)
+++ sling/trunk/contrib/crankstart/launcher/src/test/resources/launcher-test.crank.txt Fri
Jun  6 12:39:29 2014
@@ -63,6 +63,8 @@ config felix.format.test FORMAT:felix.co
   service.ranking.launcher.test=I"54321"
   array=["foo","bar.from.launcher.test"]
   
+config empty.config.should.work FORMAT:felix.config
+  
 # Test an extension command provided by our test-services bundle
 test.system.property the.test.system.property was set by test-services bundle
   



Mime
View raw message