ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ConcurrentHashMap8Test.java
(Generate patch)

Comparing jsr166/src/test/tck/ConcurrentHashMap8Test.java (file contents):
Revision 1.32 by jsr166, Sat Oct 15 18:51:12 2016 UTC vs.
Revision 1.33 by jsr166, Sun Nov 6 22:42:10 2016 UTC

# Line 63 | Line 63 | public class ConcurrentHashMap8Test exte
63       */
64      public void testComputeIfAbsent() {
65          ConcurrentHashMap map = map5();
66 <        map.computeIfAbsent(six, (x) -> "Z");
66 >        map.computeIfAbsent(six, x -> "Z");
67          assertTrue(map.containsKey(six));
68      }
69  
# Line 72 | Line 72 | public class ConcurrentHashMap8Test exte
72       */
73      public void testComputeIfAbsent2() {
74          ConcurrentHashMap map = map5();
75 <        assertEquals("A", map.computeIfAbsent(one, (x) -> "Z"));
75 >        assertEquals("A", map.computeIfAbsent(one, x -> "Z"));
76      }
77  
78      /**
# Line 80 | Line 80 | public class ConcurrentHashMap8Test exte
80       */
81      public void testComputeIfAbsent3() {
82          ConcurrentHashMap map = map5();
83 <        map.computeIfAbsent(six, (x) -> null);
83 >        map.computeIfAbsent(six, x -> null);
84          assertFalse(map.containsKey(six));
85      }
86  
# Line 1107 | Line 1107 | public class ConcurrentHashMap8Test exte
1107                  public void realRun() {
1108                      int result = 0;
1109                      for (int i = 0; i < iterations; i++)
1110 <                        result += map.computeIfAbsent(i % mapSize, (k) -> k + k);
1110 >                        result += map.computeIfAbsent(i % mapSize, k -> k + k);
1111                      if (result == -42) throw new Error();
1112                  }};
1113              for (int i = 0; i < threads; i++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines