commit | 819a0a33b9a260207bbd0349ae59469aa990f73b | [log] [tgz] |
---|---|---|
author | Freeman Yue Fang <ffang@apache.org> | Sun Sep 27 04:51:04 2009 +0000 |
committer | Freeman Yue Fang <ffang@apache.org> | Sun Sep 27 04:51:04 2009 +0000 |
tree | 21275122e874974fde5e896337f4fa53a9b973a7 | |
parent | 6189a6761363c0c5e67c50469557c1610bf2a075 [diff] |
[FELIX-1645] add null and empty check for FeaturesServiceImpl.readValue(String val) git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@819257 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java b/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java index ab25f7b..e68fb04 100644 --- a/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java +++ b/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
@@ -561,8 +561,10 @@ protected Set<Long> readValue(String val) { Set<Long> set = new HashSet<Long>(); - for (String str : val.split(",")) { - set.add(Long.parseLong(str)); + if (val != null && val.length() != 0) { + for (String str : val.split(",")) { + set.add(Long.parseLong(str)); + } } return set; }