On Tue, May 5, 2009 at 12:49, Vincent Massol
<vincent(a)massol.net>
wrote:
On May 5, 2009, at 12:40 PM, tmortagne (SVN) wrote:
Author: tmortagne
Date: 2009-05-05 12:40:47 +0200 (Tue, 05 May 2009)
New Revision: 19378
Added:
platform/core/branches/xwiki-core-1.8/xwiki-bridge/src/test/
platform/core/branches/xwiki-core-1.8/xwiki-bridge/src/test/java/
platform/core/branches/xwiki-core-1.8/xwiki-bridge/src/test/java/
org/
platform/core/branches/xwiki-core-1.8/xwiki-bridge/src/test/java/
org/xwiki/
platform/core/branches/xwiki-core-1.8/xwiki-bridge/src/test/java/
org/xwiki/bridge/
platform/core/branches/xwiki-core-1.8/xwiki-bridge/src/test/java/
org/xwiki/bridge/DocumentNameTest.java
Modified:
platform/core/branches/xwiki-core-1.8/xwiki-bridge/src/main/java/
org/xwiki/bridge/DocumentName.java
platform/core/branches/xwiki-core-1.8/xwiki-core/src/main/java/
com/
xpn/xwiki/doc/XWikiDocument.java
platform/core/branches/xwiki-core-1.8/xwiki-core/src/test/java/
com/
xpn/xwiki/doc/XWikiDocumentTest.java
Log:
XWIKI-3754: XWikiDocument.getLinkedPages loose multiwiki information
[snip]
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ boolean equals = false;
+
+ if (obj == this) {
+ equals = true;
+ } else if (obj instanceof DocumentName) {
+ DocumentName documentName = (DocumentName) obj;
+
+ equals =
+ documentName.getWiki().equals(this.getWiki()) &&
documentName.getSpace().equals(this.getSpace())
+ &&
documentName.getPage().equals(this.getPage());
+ }
+
+ return equals;
+ }
You're not handling null I think.