File tree 1 file changed +4
-4
lines changed
test/jdk/java/util/concurrent/atomic
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ static void testDoubleAdder() {
64
64
}
65
65
66
66
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 );
69
69
a .accumulate (17.5d );
70
70
DoubleAccumulator result = echo (a );
71
71
if (result .get () != a .get ())
@@ -89,8 +89,8 @@ static void testLongAdder() {
89
89
}
90
90
91
91
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 );
94
94
a .accumulate (34 );
95
95
LongAccumulator result = echo (a );
96
96
if (result .get () != a .get ())
You can’t perform that action at this time.
0 commit comments