-
Bug
-
Resolution: Fixed
-
P3
-
15, 16
-
b15
-
generic
-
generic
The fix for JDK-8221696 added MappedByteBuffer(int index, int length) to allow specifying a range to write back to storage. The no-arg MappedByteBuffer at this time and before wrote back the entire buffer content, i.e., the half-open range [0,capacity()). The new force(int,int) checked its parameters using Objects.checkFromIndexSize(index, length, limit()), i.e., with the limit instead of the capacity as upper bound. In JDK-8243491 the no-arg force() was changed as
@@ -293,8 +227,7 @@ public abstract class MappedByteBuffer
return force(0, limit());
}
if ((address != 0) && (capacity() != 0)) {
- long offset = mappingOffset();
- force0(fd, mappingAddress(offset), mappingLength(offset));
+ return force(0, capacity());
}
return this;
}
to call the new force(int,int). This inadvertently changed the upper bound of the no-arg force() from capacity() to limit() thereby provokingJDK-8246729. The upper bound of force() should be the capacity.
@@ -293,8 +227,7 @@ public abstract class MappedByteBuffer
return force(0, limit());
}
if ((address != 0) && (capacity() != 0)) {
- long offset = mappingOffset();
- force0(fd, mappingAddress(offset), mappingLength(offset));
+ return force(0, capacity());
}
return this;
}
to call the new force(int,int). This inadvertently changed the upper bound of the no-arg force() from capacity() to limit() thereby provoking
- csr for
-
JDK-8263826 (bf) MappedByteBuffer.force() should use the capacity as its upper bound
- Closed
- relates to
-
JDK-8246729 MappedByteBuffer.force() throws IndexOutOfBoundsException
- Closed
-
JDK-4833719 (bf) Views of MappedByteBuffers are not MappedByteBuffers, and cannot be forced
- Resolved
-
JDK-8243491 Implementation of Foreign-Memory Access API (Second Incubator)
- Resolved
-
JDK-8221696 (bf) MappedByteBuffer.force method to specify range
- Resolved
(2 links to)