Merge pull request #90 from shannah/issue_88

Fix for issue #88.  Collections.shuffle bug.
This commit is contained in:
Alexey Andreev 2015-03-26 20:08:46 +03:00
commit e3775890fa

View File

@ -291,7 +291,7 @@ public class TCollections extends TObject {
private static void shuffleRandomAccess(TList<?> list, TRandom rnd) { private static void shuffleRandomAccess(TList<?> list, TRandom rnd) {
for (int i = list.size() - 1; i > 0; --i) { 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); swap(list, i, j);
} }
} }