Fix tabbing.... Please fix your editors so they do tabbing correctly!!! (Spaces...
[IRC.git] / Robust / src / Analysis / Pointer / Util.java
index c0573003c47b88615707abd22eb77d646ebf9451..0fe00b93b10ff9336b176fe6b47eda3fc423147c 100644 (file)
@@ -6,7 +6,7 @@ import java.util.Set;
 public class Util {
   public static <T> MySet<T> setSubtract(Set <T> orig, Set<T> sub) {
     MySet<T> newset=new MySet<T>();
-    for(T e: orig) {
+    for(T e : orig) {
       if (!sub.contains(e))
        newset.add(e);
     }
@@ -19,7 +19,8 @@ public class Util {
        map.get(key).removeAll(toremove);
       map.get(key).addAll(toadd);
     } else {
-      map.put(key, (MySet<V>) toadd.clone());
+      if (toadd!=null)
+       map.put(key, (MySet<V>)toadd.clone());
     }
   }