38 |
|
* Turn this up to some higher value like 1000 for stress testing: |
39 |
|
* java -Dmillis=1000 RacingCollections |
40 |
|
*/ |
41 |
< |
final static long defaultWorkTimeMillis = Long.getLong("millis", 10L); |
41 |
> |
static final long defaultWorkTimeMillis = Long.getLong("millis", 10L); |
42 |
|
|
43 |
|
/** |
44 |
|
* Whether to print debug information. |
45 |
|
*/ |
46 |
< |
final static boolean debug = Boolean.getBoolean("debug"); |
46 |
> |
static final boolean debug = Boolean.getBoolean("debug"); |
47 |
|
|
48 |
< |
final static Integer one = 1; |
49 |
< |
final static Integer two = 2; |
48 |
> |
static final Integer one = 1; |
49 |
> |
static final Integer two = 2; |
50 |
|
|
51 |
|
/** |
52 |
|
* A thread that mutates an object forever, alternating between |
340 |
|
try {realMain(args);} catch (Throwable t) {unexpected(t);} |
341 |
|
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed); |
342 |
|
if (failed > 0) throw new AssertionError("Some tests failed");} |
343 |
< |
private static abstract class CheckedThread extends Thread { |
343 |
> |
private abstract static class CheckedThread extends Thread { |
344 |
|
abstract void realRun() throws Throwable; |
345 |
|
public void run() { |
346 |
|
try { realRun(); } catch (Throwable t) { unexpected(t); }}} |