45 |
|
} |
46 |
|
|
47 |
|
/** Re-implement Integer.compare for old java versions */ |
48 |
< |
static int compare(int x, int y) { return x < y ? -1 : x > y ? 1 : 0; } |
48 |
> |
static int compare(int x, int y) { |
49 |
> |
return (x < y) ? -1 : (x > y) ? 1 : 0; |
50 |
> |
} |
51 |
|
|
52 |
|
// classes for testing Comparable fallbacks |
53 |
|
static class BI implements Comparable<BI> { |
535 |
|
/** |
536 |
|
* Constructor (initialCapacity, loadFactor) throws |
537 |
|
* IllegalArgumentException if either argument is negative |
538 |
< |
*/ |
538 |
> |
*/ |
539 |
|
public void testConstructor2() { |
540 |
|
try { |
541 |
|
new ConcurrentHashMap(-1, .75f); |