File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
test/jdk/java/util/concurrent/atomic Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ static void testDoubleAdder() {
6464 }
6565
6666 static void testDoubleAccumulator () {
67- DoubleBinaryOperator plus = (DoubleBinaryOperator & Serializable ) (x , y ) -> x + y ;
68- DoubleAccumulator a = new DoubleAccumulator (plus , 13.9d );
67+ DoubleBinaryOperator op = (DoubleBinaryOperator & Serializable ) (x , y ) -> Math . max ( x , y ) ;
68+ DoubleAccumulator a = new DoubleAccumulator (op , Double . NEGATIVE_INFINITY );
6969 a .accumulate (17.5d );
7070 DoubleAccumulator result = echo (a );
7171 if (result .get () != a .get ())
@@ -89,8 +89,8 @@ static void testLongAdder() {
8989 }
9090
9191 static void testLongAccumulator () {
92- LongBinaryOperator plus = (LongBinaryOperator & Serializable ) (x , y ) -> x + y ;
93- LongAccumulator a = new LongAccumulator (plus , - 2 );
92+ LongBinaryOperator op = (LongBinaryOperator & Serializable ) (x , y ) -> Math . max ( x , y ) ;
93+ LongAccumulator a = new LongAccumulator (op , Long . MIN_VALUE );
9494 a .accumulate (34 );
9595 LongAccumulator result = echo (a );
9696 if (result .get () != a .get ())
You can’t perform that action at this time.
0 commit comments