felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1768399 - /felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/Configurable.java
Date Sun, 06 Nov 2016 22:58:45 GMT
Author: pderop
Date: Sun Nov  6 22:58:45 2016
New Revision: 1768399

URL: http://svn.apache.org/viewvc?rev=1768399&view=rev
Log:
FELIX-5400: Can't override default configuration type list value using an empty list.

Modified:
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/Configurable.java

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/Configurable.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/Configurable.java?rev=1768399&r1=1768398&r2=1768399&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/Configurable.java
(original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/Configurable.java
Sun Nov  6 22:58:45 2016
@@ -397,7 +397,8 @@ public final class Configurable {
                 if (str.startsWith("[") && str.endsWith("]")) {
                     str = str.substring(1, str.length() - 1);
                 }
-                return Arrays.asList(str.split("\\s*,\\s*"));
+                // don't split in case we are parsing an empty [] list, in which case we
need to return an empty list.
+                return str.length() == 0 ? Collections.emptyList() : Arrays.asList(str.split("\\s*,\\s*"));
             }
 
             return Arrays.asList(value);



Mime
View raw message