summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-03-17 01:40:44 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-03-17 01:40:44 +0000
commit3ded433af820aae000913fa0305380a0f7988c2c (patch)
tree8f9854db54f0337c4db488e78f5b3d4ac9ac8ba6 /sca-java-2.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca
parentd65fd2438b4ba4df1967018fc4934db22b47df24 (diff)
Fix the equals and hashCode to avoid componentType conflicts
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@924089 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca')
-rw-r--r--sca-java-2.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java48
1 files changed, 30 insertions, 18 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java b/sca-java-2.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java
index f2f9bf7396..bdf9c81909 100644
--- a/sca-java-2.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java
+++ b/sca-java-2.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java
@@ -38,8 +38,6 @@ class WebImplementationImpl extends ImplementationImpl implements WebImplementat
private List<Property> properties = new ArrayList<Property>();
private List<Reference> references = new ArrayList<Reference>();
- private String uri;
- private boolean unresolved;
private String webURI;
private boolean jsClient = true;
@@ -64,22 +62,6 @@ class WebImplementationImpl extends ImplementationImpl implements WebImplementat
return references;
}
- public String getURI() {
- return uri;
- }
-
- public void setURI(String uri) {
- this.uri = uri;
- }
-
- public boolean isUnresolved() {
- return unresolved;
- }
-
- public void setUnresolved(boolean unresolved) {
- this.unresolved = unresolved;
- }
-
public String getWebURI() {
return webURI;
}
@@ -141,4 +123,34 @@ class WebImplementationImpl extends ImplementationImpl implements WebImplementat
this.jsClient = jsClient;
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((webURI == null) ? 0 : webURI.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (!(obj instanceof WebImplementationImpl)) {
+ return false;
+ }
+ WebImplementationImpl other = (WebImplementationImpl)obj;
+ if (webURI == null) {
+ if (other.webURI != null) {
+ return false;
+ }
+ } else if (!webURI.equals(other.webURI)) {
+ return false;
+ }
+ return true;
+ }
+
}