Skip to content
Permalink
Browse files
Applying suggested fix for JENKINS-25964
  • Loading branch information
ninian committed Mar 2, 2015
1 parent 0871879 commit 2523774125cc54319bf4c6ed5ddd888b282f4837
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/main/java/configurationslicing/UnorderedStringSlice.java
@@ -13,16 +13,21 @@
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;

import org.kohsuke.stapler.StaplerRequest;

import configurationslicing.UnorderedStringSlicer.UnorderedStringSlicerSpec;
import configurationslicing.tools.AbstractToolSlicerSpec;

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 +80,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 2523774

Please sign in to comment.