Author: fmancinelli
Date: 2007-11-27 14:55:42 +0100 (Tue, 27 Nov 2007)
New Revision: 6097

Modified:
   
xwiki-extensions/xwiki-eclipse/trunk/plugins/org.xwiki.eclipse/src/main/java/org/xwiki/eclipse/model/impl/XWikiSpace.java
Log:
XECLIPSE-67

* Completely fixed the bug where pages from a Wiki where added to spaces of 
another Wiki in the XWiki explorer, when multiple connections were present.

Modified: 
xwiki-extensions/xwiki-eclipse/trunk/plugins/org.xwiki.eclipse/src/main/java/org/xwiki/eclipse/model/impl/XWikiSpace.java
===================================================================
--- 
xwiki-extensions/xwiki-eclipse/trunk/plugins/org.xwiki.eclipse/src/main/java/org/xwiki/eclipse/model/impl/XWikiSpace.java
   2007-11-27 13:23:10 UTC (rev 6096)
+++ 
xwiki-extensions/xwiki-eclipse/trunk/plugins/org.xwiki.eclipse/src/main/java/org/xwiki/eclipse/model/impl/XWikiSpace.java
   2007-11-27 13:55:42 UTC (rev 6097)
@@ -155,12 +155,19 @@
         return connection;
     }
 
+    public void remove() throws XWikiConnectionException
+    {
+        connection.removeSpace(this);
+    }
+
     @Override
     public int hashCode()
     {
         final int prime = 31;
         int result = 1;
+        result = prime * result + ((connection == null) ? 0 : 
connection.hashCode());
         result = prime * result + ((key == null) ? 0 : key.hashCode());
+        result = prime * result + ((space == null) ? 0 : space.hashCode());
         return result;
     }
 
@@ -174,18 +181,22 @@
         if (getClass() != obj.getClass())
             return false;
         final XWikiSpace other = (XWikiSpace) obj;
+        if (connection == null) {
+            if (other.connection != null)
+                return false;
+        } else if (!connection.equals(other.connection))
+            return false;
         if (key == null) {
             if (other.key != null)
                 return false;
         } else if (!key.equals(other.key))
             return false;
+        if (space == null) {
+            if (other.space != null)
+                return false;
+        } else if (!space.equals(other.space))
+            return false;
         return true;
     }
 
-    public void remove() throws XWikiConnectionException
-    {
-        connection.removeSpace(this);
-
-    }
-
 }

_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to