mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Merge pull request #91 from shannah/issue_88_part2
Another fix for Collections.shuffle(). Without this fix, shuffle doesn'...
This commit is contained in:
commit
efe0b75206
|
@ -283,7 +283,7 @@ public class TCollections extends TObject {
|
||||||
shuffleRandomAccess(list, rnd);
|
shuffleRandomAccess(list, rnd);
|
||||||
} else {
|
} else {
|
||||||
TList<Object> randomAccess = new TArrayList<>(list);
|
TList<Object> randomAccess = new TArrayList<>(list);
|
||||||
shuffleRandomAccess(list, rnd);
|
shuffleRandomAccess(randomAccess, rnd);
|
||||||
list.clear();
|
list.clear();
|
||||||
((TList<Object>)list).addAll(randomAccess);
|
((TList<Object>)list).addAll(randomAccess);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user