You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2012/06/09 05:46:10 UTC
svn commit: r1348317 -
/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java
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