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 bec577eba..6816aea8e 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 @@ -283,7 +283,7 @@ public class TCollections extends TObject { shuffleRandomAccess(list, rnd); } else { TList randomAccess = new TArrayList<>(list); - shuffleRandomAccess(list, rnd); + shuffleRandomAccess(randomAccess, rnd); list.clear(); ((TList)list).addAll(randomAccess); }