cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johnth...@apache.org
Subject svn commit: r1363938 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/query/Ordering.java test/java/org/apache/cayenne/query/OrderingTest.java
Date Fri, 20 Jul 2012 20:25:11 GMT
Author: johnthuss
Date: Fri Jul 20 20:25:10 2012
New Revision: 1363938

URL: http://svn.apache.org/viewvc?rev=1363938&view=rev
Log:
Make Ordering.orderList covariant for 'orderings' list argument

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/Ordering.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/OrderingTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/Ordering.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/Ordering.java?rev=1363938&r1=1363937&r2=1363938&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/Ordering.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/Ordering.java
Fri Jul 20 20:25:10 2012
@@ -56,7 +56,7 @@ public class Ordering implements Compara
      * is more significant than any other Ordering with higher index. List being ordered
      * is modified in place.
      */
-    public static void orderList(List<?> objects, List<Ordering> orderings) {
+    public static void orderList(List<?> objects, List<? extends Ordering> orderings)
{
         Collections.sort(objects, ComparatorUtils.chainedComparator(orderings));
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/OrderingTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/OrderingTest.java?rev=1363938&r1=1363937&r2=1363938&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/OrderingTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/OrderingTest.java
Fri Jul 20 20:25:10 2012
@@ -160,7 +160,7 @@ public class OrderingTest extends TestCa
         list.add(new TestBean("b", 2));
         list.add(new TestBean("b", 5));
 
-        List orderings = new ArrayList(2);
+        List<Ordering> orderings = new ArrayList<Ordering>(2);
         orderings.add(new Ordering("string", SortOrder.ASCENDING));
         orderings.add(new Ordering("integer", SortOrder.DESCENDING));
 



Mime
View raw message