Author: gbadner
Date: 2008-05-01 19:22:17 -0400 (Thu, 01 May 2008)
New Revision: 14635
Modified:
core/branches/Branch_3_2/src/org/hibernate/cache/QueryKey.java
Log:
HHH-2021 : fix fragile QueryKey.equals()
Modified: core/branches/Branch_3_2/src/org/hibernate/cache/QueryKey.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/cache/QueryKey.java 2008-05-01 23:20:39 UTC
(rev 14634)
+++ core/branches/Branch_3_2/src/org/hibernate/cache/QueryKey.java 2008-05-01 23:22:17 UTC
(rev 14635)
@@ -51,6 +51,7 @@
}
public boolean equals(Object 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;