diff --git a/src/main/java/com/samskivert/depot/Query.java b/src/main/java/com/samskivert/depot/Query.java index 1e6fc63..e1d460e 100644 --- a/src/main/java/com/samskivert/depot/Query.java +++ b/src/main/java/com/samskivert/depot/Query.java @@ -683,11 +683,13 @@ public class Query return new Cons(head, tail); } + // note that because new elements are prepended to the cons list, we turn them into a Java list + // in reverse order, which matches the original order in which they were "appended" protected static void addAll (List toList, Cons cons) { if (cons != null) { - toList.add(cons.head); addAll(toList, cons.tail); + toList.add(cons.head); } }