mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Honours the maximum capacity set for Bytes, closes https://github.com/OpenHFT/Chronicle-Bytes/issues/141
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
<artifactId>chronicle-map</artifactId>
|
||||
|
||||
<version>3.20.62-SNAPSHOT</version>
|
||||
<version>3.20.80-SNAPSHOT</version>
|
||||
<name>OpenHFT/Chronicle-Map</name>
|
||||
<description>Chronicle-Map</description>
|
||||
<packaging>bundle</packaging>
|
||||
|
||||
@@ -659,13 +659,14 @@ public abstract class SegmentStages implements SegmentLock, LocksInterface {
|
||||
|
||||
@Stage("Segment")
|
||||
public Bytes segmentBytesForRead() {
|
||||
segmentBytes.readLimitToCapacity();
|
||||
segmentBytes.readLimit(segmentBS.capacity());
|
||||
return segmentBytes;
|
||||
}
|
||||
|
||||
@Stage("Segment")
|
||||
public Bytes segmentBytesForWrite() {
|
||||
segmentBytes.readPosition(0);
|
||||
segmentBytes.readPosition(0)
|
||||
.readLimit(segmentBS.capacity());
|
||||
return segmentBytes;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user