From e8b323c7cb7d55be9a4df579231e44f04f53d766 Mon Sep 17 00:00:00 2001 From: Przemyslaw Szczepaniak Date: Fri, 11 Mar 2016 15:59:10 +0000 Subject: JSR-166 update without java 1.9 method/classes Second attempt, in frist one I've submitted some code from openJdk 1.9 that shouldn't be here, orignial change can be found at 5328e07d282bef36ac8b757bbee16a761415b2c4 Adapted from sources taken from CVS using: cvs -d ':pserver:anonymous@gee.cs.oswego.edu/home/jsr166/jsr166' checkout -D "03/03/2016 10:00:00 GMT" jsr166 This time with hidden/removed "@since 9" methods and classes Bug: 27426599 Change-Id: Ibd8d26e13cba091bfd983c73d005e4f8d8f5946d (cherry picked from commit b8b75116273ecfdb8ffdd1869b1c0dd04570a95e) --- jsr166-tests/src/test/java/jsr166/ConcurrentHashMapTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'jsr166-tests/src/test/java/jsr166/ConcurrentHashMapTest.java') 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 { @@ -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); -- cgit v1.2.3