--- jsr166/src/test/tck/ConcurrentHashMapTest.java 2014/12/31 19:05:42 1.40 +++ jsr166/src/test/tck/ConcurrentHashMapTest.java 2015/02/27 21:43:18 1.43 @@ -287,6 +287,7 @@ public class ConcurrentHashMapTest exten assertEquals("A", (String)map.get(one)); ConcurrentHashMap empty = new ConcurrentHashMap(); assertNull(map.get("anything")); + assertNull(empty.get("anything")); } /** @@ -537,12 +538,12 @@ public class ConcurrentHashMapTest exten try { new ConcurrentHashMap(-1, .75f); shouldThrow(); - } catch (IllegalArgumentException e) {} + } catch (IllegalArgumentException success) {} try { new ConcurrentHashMap(16, -1); shouldThrow(); - } catch (IllegalArgumentException e) {} + } catch (IllegalArgumentException success) {} } /** @@ -553,17 +554,17 @@ public class ConcurrentHashMapTest exten try { new ConcurrentHashMap(-1, .75f, 1); shouldThrow(); - } catch (IllegalArgumentException e) {} + } catch (IllegalArgumentException success) {} try { new ConcurrentHashMap(16, -1, 1); shouldThrow(); - } catch (IllegalArgumentException e) {} + } catch (IllegalArgumentException success) {} try { new ConcurrentHashMap(16, .75f, -1); shouldThrow(); - } catch (IllegalArgumentException e) {} + } catch (IllegalArgumentException success) {} } /** @@ -574,7 +575,7 @@ public class ConcurrentHashMapTest exten try { new ConcurrentHashMap(null); shouldThrow(); - } catch (NullPointerException e) {} + } catch (NullPointerException success) {} } /** @@ -589,7 +590,6 @@ public class ConcurrentHashMapTest exten assertFalse(map2.equals(map1)); } - /** * get(null) throws NPE */