From 7d6d777906f2f293f2df57661e500b62f297ea91 Mon Sep 17 00:00:00 2001 From: Steve Hannah Date: Thu, 26 Mar 2015 09:16:59 -0700 Subject: [PATCH] Fix for issue 88. Collections.shuffle bug. --- .../main/java/org/teavm/classlib/java/util/TCollections.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/util/TCollections.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/util/TCollections.java index f07937df7..bec577eba 100644 --- a/teavm-classlib/src/main/java/org/teavm/classlib/java/util/TCollections.java +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/util/TCollections.java @@ -291,7 +291,7 @@ public class TCollections extends TObject { private static void shuffleRandomAccess(TList list, TRandom rnd) { for (int i = list.size() - 1; i > 0; --i) { - int j = rnd.next(i + 1); + int j = rnd.nextInt(i + 1); swap(list, i, j); } }