Author: tfischer
Date: Sat Jun  9 03:46:10 2012
New Revision: 1348317

URL: http://svn.apache.org/viewvc?rev=1348317&view=rev
Log:
remove unneeded instanceof in equals

Modified:
    
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java

Modified: 
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java?rev=1348317&r1=1348316&r2=1348317&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java
 (original)
+++ 
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java
 Sat Jun  9 03:46:10 2012
@@ -496,6 +496,7 @@ public class Criterion implements Serial
      *
      * @return A String with the representation of the Criterion.
      */
+    @Override
     public String toString()
     {
         StringBuilder builder = new StringBuilder();
@@ -507,13 +508,14 @@ public class Criterion implements Serial
      * This method checks another Criteria.Criterion to see if they contain
      * the same attributes.
      */
+    @Override
     public boolean equals(Object obj)
     {
         if (this == obj)
         {
             return true;
         }
-        if ((obj == null) || !(obj instanceof Criterion))
+        if (obj == null)
         {
             return false;
         }
@@ -539,6 +541,7 @@ public class Criterion implements Serial
     /**
      * Returns a hash code value for the object.
      */
+    @Override
     public int hashCode()
     {
         HashCodeBuilder hashCodeBuilder = new HashCodeBuilder();



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to