File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
src/test/java/pl/project13/maven/git Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 2929import java .io .IOException ;
3030import java .util .HashMap ;
3131import java .util .Map ;
32- import java .util .Random ;
32+ import java .util .concurrent . ThreadLocalRandom ;
3333
3434import static org .mockito .internal .util .reflection .Whitebox .setInternalState ;
3535
3636public abstract class GitIntegrationTest {
3737
38- /**
39- * Random number generator for generating random sandbox folder names.
40- */
41- private final static Random r = new Random ();
42-
4338 private final static String SANDBOX_DIR = "target" + File .separator + "sandbox" + File .separator ;
4439
4540 /**
@@ -55,7 +50,7 @@ public void setUp() throws Exception {
5550 // generate unique sandbox for this test
5651 File sandbox ;
5752 do {
58- currSandbox = SANDBOX_DIR + "sandbox" + Integer .toString (r .nextInt (Integer .MAX_VALUE ));
53+ currSandbox = SANDBOX_DIR + "sandbox" + Integer .toString (ThreadLocalRandom . current () .nextInt (Integer .MAX_VALUE ));
5954 sandbox = new File (currSandbox );
6055 } while (sandbox .exists ());
6156
You can’t perform that action at this time.
0 commit comments