Skip to content
Permalink
Browse files

WFCORE-4399 ResourceEntry implementations to not implement equals/has…

…hCode()
  • Loading branch information
pferraro committed Apr 3, 2019
1 parent 54ea777 commit 109661fde354f0cac6dec97facf75afada847277
@@ -248,4 +248,15 @@ public PlaceholderResourceEntry clone() {
public Set<String> getOrderedChildTypes() {
return Collections.emptySet();
}

@Override
public int hashCode() {
return this.moduleName.hashCode();
}

@Override
public boolean equals(Object object) {
if (!(object instanceof ExtensionResource)) return false;
return this.moduleName.equals(((ExtensionResource) object).moduleName);
}
}
@@ -450,6 +450,17 @@ public boolean isProxy() {
public Resource clone() {
return delegate.clone();
}

@Override
public int hashCode() {
return this.getPathElement().hashCode();
}

@Override
public boolean equals(Object object) {
if (!(object instanceof ResourceEntry)) return false;
return this.getPathElement().equals(((ResourceEntry) object).getPathElement());
}
}

}
@@ -165,5 +165,16 @@ public PathElement getPathElement() {
public PlaceholderResourceEntry clone() {
return this;
}

@Override
public int hashCode() {
return this.path.hashCode();
}

@Override
public boolean equals(Object object) {
if (!(object instanceof ResourceEntry)) return false;
return this.path.equals(((ResourceEntry) object).getPathElement());
}
}
}
@@ -394,5 +394,16 @@ public String getName() {
public PathElement getPathElement() {
return delegate.getPathElement();
}

@Override
public int hashCode() {
return this.getPathElement().hashCode();
}

@Override
public boolean equals(Object object) {
if (!(object instanceof ResourceEntry)) return false;
return this.getPathElement().equals(((ResourceEntry) object).getPathElement());
}
}
}

0 comments on commit 109661f

Please sign in to comment.
You can’t perform that action at this time.