Skip to content

Commit

Permalink
Merge pull request #5 from jacobrobertson/master
Browse files Browse the repository at this point in the history
FIXED JENKINS-16828
  • Loading branch information
jacobrobertson committed Oct 3, 2013
2 parents a93b379 + 10274b7 commit 1d18d54
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/configurationslicing/BooleanSlice.java
Expand Up @@ -36,7 +36,11 @@ public void add(String name, boolean value) {
}

public boolean get(String name) {
return nameToValue.get(name);
Boolean object = nameToValue.get(name);
if (object == null) {
return false;
}
return object.booleanValue();
}

public BooleanSlicerSpec<I> getSpec() {
Expand All @@ -58,7 +62,7 @@ public List<I> getConfiguredItems() {
@Override
public Slice newInstance(StaplerRequest req, JSONObject formData)
throws FormException {
return new BooleanSlice<I>(BooleanSlice.this.spec, req.bindJSONToList(ItemState.class, formData.get("itemstate")));
return new BooleanSlice<I>(BooleanSlice.this.spec, req.bindJSONToList(ItemState.class, formData.get("itemstate")));
}

public static class ItemState {
Expand Down

0 comments on commit 1d18d54

Please sign in to comment.