[gatein-commits] gatein SVN: r4957 - components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Nov 5 12:06:18 EDT 2010
Author: chris.laprun at jboss.com
Date: 2010-11-05 12:06:17 -0400 (Fri, 05 Nov 2010)
New Revision: 4957
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java
Log:
- GTNWSRP-148: Do not check key for equals since it's not present when comparing a persisted RegistrationPropertyDescription and a non-persisted one, resulting in improper behavior.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java 2010-11-05 15:17:57 UTC (rev 4956)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java 2010-11-05 16:06:17 UTC (rev 4957)
@@ -105,6 +105,7 @@
}
+ @Override
public boolean equals(Object o)
{
if (this == o)
@@ -118,23 +119,13 @@
RegistrationPropertyDescription that = (RegistrationPropertyDescription)o;
- if (key != null ? !key.equals(that.key) : that.key != null)
- {
- return false;
- }
- if (!name.equals(that.name))
- {
- return false;
- }
- return type.equals(that.type);
-
+ return name.equals(that.name) && type.equals(that.type);
}
+ @Override
public int hashCode()
{
- int result;
- result = (key != null ? key.hashCode() : 0);
- result = 31 * result + name.hashCode();
+ int result = name.hashCode();
result = 31 * result + type.hashCode();
return result;
}
More information about the gatein-commits
mailing list