db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1348317 - /db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java
Date Sat, 09 Jun 2012 03:46:10 GMT
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: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message