You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2010/01/21 16:33:55 UTC
svn commit: r901741 -
/commons/sandbox/at-digester/trunk/src/test/org/apache/commons/digester/annotations/employee/Employee.java
Author: simonetripodi
Date: Thu Jan 21 15:33:55 2010
New Revision: 901741
URL: http://svn.apache.org/viewvc?rev=901741&view=rev
Log:
added missing equals() method to Employee class
Modified:
commons/sandbox/at-digester/trunk/src/test/org/apache/commons/digester/annotations/employee/Employee.java
Modified: commons/sandbox/at-digester/trunk/src/test/org/apache/commons/digester/annotations/employee/Employee.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/test/org/apache/commons/digester/annotations/employee/Employee.java?rev=901741&r1=901740&r2=901741&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/test/org/apache/commons/digester/annotations/employee/Employee.java (original)
+++ commons/sandbox/at-digester/trunk/src/test/org/apache/commons/digester/annotations/employee/Employee.java Thu Jan 21 15:33:55 2010
@@ -69,6 +69,33 @@
}
@Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Employee other = (Employee) obj;
+ if (this.addresses == null) {
+ if (other.getAddresses() != null)
+ return false;
+ } else if (!this.addresses.equals(other.getAddresses()))
+ return false;
+ if (this.firstName == null) {
+ if (other.getFirstName() != null)
+ return false;
+ } else if (!this.firstName.equals(other.getFirstName()))
+ return false;
+ if (this.lastName == null) {
+ if (other.getLastName() != null)
+ return false;
+ } else if (!this.lastName.equals(other.getLastName()))
+ return false;
+ return true;
+ }
+
+ @Override
public String toString() {
return "Employee [addresses="
+ addresses