提交 b0838c57 编写于 作者: C chegar

8024103: AtomicLongArray getAndAccumulate/accumulateAndGet have int type for new value arg

Reviewed-by: alanb, psandoz
上级 fbe4eda3
...@@ -303,7 +303,7 @@ public class AtomicLongArray implements java.io.Serializable { ...@@ -303,7 +303,7 @@ public class AtomicLongArray implements java.io.Serializable {
* @return the previous value * @return the previous value
* @since 1.8 * @since 1.8
*/ */
public final long getAndAccumulate(int i, int x, public final long getAndAccumulate(int i, long x,
LongBinaryOperator accumulatorFunction) { LongBinaryOperator accumulatorFunction) {
long offset = checkedByteOffset(i); long offset = checkedByteOffset(i);
long prev, next; long prev, next;
...@@ -329,7 +329,7 @@ public class AtomicLongArray implements java.io.Serializable { ...@@ -329,7 +329,7 @@ public class AtomicLongArray implements java.io.Serializable {
* @return the updated value * @return the updated value
* @since 1.8 * @since 1.8
*/ */
public final long accumulateAndGet(int i, int x, public final long accumulateAndGet(int i, long x,
LongBinaryOperator accumulatorFunction) { LongBinaryOperator accumulatorFunction) {
long offset = checkedByteOffset(i); long offset = checkedByteOffset(i);
long prev, next; long prev, next;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册