Created
August 11, 2010 02:51
-
-
Save ALRubinger/518395 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alr@alr-laptop shrinkwrap]$ git diff | |
diff --git a/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/container/ContainerBase.java b/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/containe | |
index 29ebe9d..2fb6483 100644 | |
--- a/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/container/ContainerBase.java | |
+++ b/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/container/ContainerBase.java | |
@@ -381,49 +381,19 @@ public abstract class ContainerBase<T extends Archive<T>> extends AssignableBase | |
@Override | |
public int hashCode() | |
{ | |
- final int prime = 31; | |
- int result = 1; | |
- result = prime * result + ((archive.getName() == null) ? 0 : archive.getName().hashCode()); | |
- result = prime * result + ((archive.getContent() == null) ? 0 : archive.getContent().hashCode()); | |
- return result; | |
+ return archive.hashCode(); | |
} | |
@Override | |
public boolean equals(Object obj) | |
{ | |
- if (this == obj) | |
- return true; | |
- if (obj == null) | |
- return false; | |
if (!(obj instanceof ContainerBase)) | |
- return false; | |
- | |
- ContainerBase<?> other = (ContainerBase<?>) obj; | |
- | |
- if (archive == null) | |
{ | |
- if (other.archive != null) | |
- return false; | |
- } | |
- else if (!archive.equals(other.archive)) | |
return false; | |
- if (archive.getContent() == null) | |
- { | |
- if (other.getArchive().getContent() != null) | |
- return false; | |
} | |
- else if (!archive.getContent().equals(other.getArchive().getContent())) | |
- return false; | |
- if (archive.getName() == null) | |
- { | |
- if (other.getArchive().getName() != null) | |
- return false; | |
- } | |
- else if (!archive.getName().equals(other.getArchive().getName())) | |
- return false; | |
- | |
- return true; | |
- } | |
+ final ContainerBase<?> other = (ContainerBase<?>) obj; | |
+ return archive.equals(other.getArchive()); | |
+ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment