We need to preserve our type parameter.

This commit is contained in:
Michael Bayne
2010-12-08 00:42:11 +00:00
parent fc4cda9260
commit dd85f630e4
@@ -381,10 +381,10 @@ public class QueryBuilder<T extends PersistentRecord>
* Returns a clone of this query builder, including all partially configured state. Useful for * Returns a clone of this query builder, including all partially configured state. Useful for
* constructing partially configured queries and then executing variants. * constructing partially configured queries and then executing variants.
*/ */
public QueryBuilder clone () public QueryBuilder<T> clone ()
{ {
try { try {
QueryBuilder qb = (QueryBuilder)super.clone(); @SuppressWarnings("unchecked") QueryBuilder<T> qb = (QueryBuilder<T>)super.clone();
// deep copy the list fields, if we have any // deep copy the list fields, if we have any
if (qb._joins != null) { if (qb._joins != null) {
qb._joins = Lists.newArrayList(qb._joins); qb._joins = Lists.newArrayList(qb._joins);