Implement equals to deal with parameters of type other than QueryKey

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14617 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Manik Surtani 2008-05-01 16:18:03 +00:00
parent e41b2aca91
commit ae40e5a70f
1 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,8 @@ public class QueryKey implements Serializable {
}
public boolean equals(Object other) {
QueryKey that = (QueryKey) other;
if (!(other instanceof QueryKey)) return false;
QueryKey that = (QueryKey) other;
if ( !sqlQueryString.equals(that.sqlQueryString) ) return false;
if ( !EqualsHelper.equals(firstRow, that.firstRow) || !EqualsHelper.equals(maxRows, that.maxRows) ) return false;
if ( !EqualsHelper.equals(customTransformer, that.customTransformer) ) return false;