updated Random() to SecureRandom() (#1670)

* updated Random() to SecureRandom()

* batch 2 of SecureRandom updates
This commit is contained in:
Subhrodip Mohanta authored and GitHub committed 2021-03-06 13:26:02 +02:00
1 parent c150871a94
commit b423002e6c
15 files changed
+32 -31

No files matched your search

@@ -23,9 +23,9 @@
package com.iluwatar.updatemethod;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -66,7 +66,7 @@ public class World {
*/
private void processInput() {
try {
int lag = new Random().nextInt(200) + 50;
int lag = new SecureRandom().nextInt(200) + 50;
Thread.sleep(lag);
} catch (InterruptedException e) {
LOGGER.error(e.getMessage());