Author: vhalbert(a)redhat.com
Date: 2010-02-02 10:49:20 -0500 (Tue, 02 Feb 2010)
New Revision: 1796
Modified:
trunk/test-integration/db/src/main/java/org/teiid/test/client/ctc/ListNestedSortComparator.java
Log:
Teiid-773 - The sort class expected all objects to be sorted were comparable. However,
with the added pushdown tests, this not always the case.
Modified:
trunk/test-integration/db/src/main/java/org/teiid/test/client/ctc/ListNestedSortComparator.java
===================================================================
---
trunk/test-integration/db/src/main/java/org/teiid/test/client/ctc/ListNestedSortComparator.java 2010-02-01
22:29:17 UTC (rev 1795)
+++
trunk/test-integration/db/src/main/java/org/teiid/test/client/ctc/ListNestedSortComparator.java 2010-02-02
15:49:20 UTC (rev 1796)
@@ -147,14 +147,15 @@
// param1 = null, so is less than a non-null
compare = -1;
}
- } else if( param2 == null ) {
+ } else if( param2 == null ) {
// param1 != null, param2 == null
compare = 1;
- } else if ( param1 instanceof Comparable ) {
+ } else if ( param1 instanceof Comparable ) {
compare = ((Comparable)param1).compareTo(param2);
} else {
- ArgCheck.isTrue(false, "Expected comparable types");
+ compare = 0;
}
+
if (compare != 0) {
boolean asc = orderTypes !=
null?((Boolean)orderTypes.get(k)).booleanValue():this.ascendingOrder;
return asc ? compare : -compare;
Show replies by date