CSR :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
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 provoking JDK-8246729. The upper bound of force() should be the capacity.
|