8024103: AtomicLongArray getAndAccumulate/accumulateAndGet have int type for new value arg
authorchegar
Mon, 02 Sep 2013 14:02:35 +0100
changeset 19794 c5a8e71fbdb6
parent 19793 05e90dbeecd4
child 19795 6c628e165476
8024103: AtomicLongArray getAndAccumulate/accumulateAndGet have int type for new value arg Reviewed-by: alanb, psandoz
jdk/src/share/classes/java/util/concurrent/atomic/AtomicLongArray.java
--- a/jdk/src/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Sun Sep 01 20:00:03 2013 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Mon Sep 02 14:02:35 2013 +0100
@@ -303,7 +303,7 @@
      * @return the previous value
      * @since 1.8
      */
-    public final long getAndAccumulate(int i, int x,
+    public final long getAndAccumulate(int i, long x,
                                       LongBinaryOperator accumulatorFunction) {
         long offset = checkedByteOffset(i);
         long prev, next;
@@ -329,7 +329,7 @@
      * @return the updated value
      * @since 1.8
      */
-    public final long accumulateAndGet(int i, int x,
+    public final long accumulateAndGet(int i, long x,
                                       LongBinaryOperator accumulatorFunction) {
         long offset = checkedByteOffset(i);
         long prev, next;