summaryrefslogtreecommitdiff
path: root/jsr166-tests/src/test/java/jsr166/ConcurrentHashMapTest.java
diff options
context:
space:
mode:
authorPrzemyslaw Szczepaniak <pszczepaniak@google.com>2016-03-15 09:37:42 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-03-15 09:37:42 +0000
commit37f9fec54f50b2e0898ee2b61d058c4de879e38b (patch)
treed7fd9980442e0d647e1454f54f3d037f4b2280e7 /jsr166-tests/src/test/java/jsr166/ConcurrentHashMapTest.java
parent8d28fc1d531b4b39def9598de89311aff112f955 (diff)
parent5328e07d282bef36ac8b757bbee16a761415b2c4 (diff)
Merge "JSR-166 update"
Diffstat (limited to 'jsr166-tests/src/test/java/jsr166/ConcurrentHashMapTest.java')
-rw-r--r--jsr166-tests/src/test/java/jsr166/ConcurrentHashMapTest.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/jsr166-tests/src/test/java/jsr166/ConcurrentHashMapTest.java b/jsr166-tests/src/test/java/jsr166/ConcurrentHashMapTest.java
index 4650f4140b..f4271279bf 100644
--- a/jsr166-tests/src/test/java/jsr166/ConcurrentHashMapTest.java
+++ b/jsr166-tests/src/test/java/jsr166/ConcurrentHashMapTest.java
@@ -30,7 +30,7 @@ public class ConcurrentHashMapTest extends JSR166TestCase {
// main(suite(), args);
// }
// public static Test suite() {
- // return new TestSuite(...);
+ // return new TestSuite(ConcurrentHashMapTest.class);
// }
/**
@@ -50,7 +50,9 @@ public class ConcurrentHashMapTest extends JSR166TestCase {
}
/** Re-implement Integer.compare for old java versions */
- static int compare(int x, int y) { return x < y ? -1 : x > y ? 1 : 0; }
+ static int compare(int x, int y) {
+ return (x < y) ? -1 : (x > y) ? 1 : 0;
+ }
// classes for testing Comparable fallbacks
static class BI implements Comparable<BI> {
@@ -538,7 +540,7 @@ public class ConcurrentHashMapTest extends JSR166TestCase {
/**
* Constructor (initialCapacity, loadFactor) throws
* IllegalArgumentException if either argument is negative
- */
+ */
public void testConstructor2() {
try {
new ConcurrentHashMap(-1, .75f);