mirror of
https://github.com/konsoletyper/teavm.git
synced 2025-01-06 10:15:18 +08:00
Another fix for Collections.shuffle(). Without this fix, shuffle doesn't actually do anything on non-random-access collections.
This commit is contained in:
parent
e3775890fa
commit
bf1f83da6c
@ -283,7 +283,7 @@ public class TCollections extends TObject {
|
||||
shuffleRandomAccess(list, rnd);
|
||||
} else {
|
||||
TList<Object> randomAccess = new TArrayList<>(list);
|
||||
shuffleRandomAccess(list, rnd);
|
||||
shuffleRandomAccess(randomAccess, rnd);
|
||||
list.clear();
|
||||
((TList<Object>)list).addAll(randomAccess);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user