Fixed a NPE
authorChristos Stathis <chstath@ebs.gr>
Wed, 27 Jun 2012 15:17:23 +0000 (18:17 +0300)
committerChristos Stathis <chstath@ebs.gr>
Wed, 27 Jun 2012 15:17:23 +0000 (18:17 +0300)
src/gr/grnet/pithos/web/client/foldertree/Folder.java

index 7f6b4a9..5ce0b72 100644 (file)
@@ -246,7 +246,8 @@ public class Folder extends Resource {
     public boolean equals(Object other) {
         if (other instanceof Folder) {
             Folder o = (Folder) other;
-            return owner.equals(o.getOwner()) && getUri().equals(o.getUri());
+            return (owner == null ? true : owner.equals(o.getOwner())) 
+                       && (getUri().equals(o.getUri()));
         }
         return false;
     }