diff --git a/java/org/hashwords/pledge/Pledge.java b/java/org/hashwords/pledge/Pledge.java index 97c6264..5875bde 100644 --- a/java/org/hashwords/pledge/Pledge.java +++ b/java/org/hashwords/pledge/Pledge.java @@ -133,7 +133,7 @@ private final static String generatePromises() */ public final static boolean addPromise(String... promises) { - boolean added = false ; + boolean added = true; if(promises != null) { @@ -155,8 +155,16 @@ public final static boolean addPromise(String... promises) } } } + else + { + added = false; + } } } + else + { + added = false; + } return added; } @@ -198,7 +206,7 @@ private final static boolean arrayContains(Object candidate , */ public final static boolean removePromise(String... promises) { - boolean removed = false; + boolean removed = true; if(promises != null) { @@ -212,8 +220,16 @@ public final static boolean removePromise(String... promises) for(String subpromise : subpromises) removed &= PROMISES.remove(subpromise); } + else + { + removed = false; + } } } + else + { + removed = false; + } return removed; }