Skip to content
Permalink
Browse files
Merge pull request #16 from ninian/master
Applying suggested fix for JENKINS-25964
  • Loading branch information
ninian committed Mar 29, 2015
2 parents e454609 + 5ef829b commit 0aadd9ec613ed84e4a379088e31bee30421038d8
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/main/java/configurationslicing/UnorderedStringSlice.java
@@ -13,6 +13,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -22,7 +23,10 @@
import configurationslicing.UnorderedStringSlicer.UnorderedStringSlicerSpec;

public class UnorderedStringSlice<I> extends Slice {

private static final Logger LOGGER = Logger.getLogger(UnorderedStringSlice.class.getName());
private Map<String, List<String>> nameToValues;

private Map<String, Set<String>> valueToNames;
private UnorderedStringSlicer.UnorderedStringSlicerSpec<I> spec;

@@ -75,6 +79,11 @@ public void add(String name, Collection<String> values) {
}

private static void addLineWithSets(Map<String, Set<String>> map, String s, String name) {
if (null == s) {
LOGGER.severe("found illegal line with null value for name: "+name);
// do nothing
return;
}
if(!map.containsKey(s)) {
map.put(s, new HashSet<String>());
}

0 comments on commit 0aadd9e

Please sign in to comment.