This is an automated email from the ASF dual-hosted git repository. bchapuis pushed a commit to branch sonar in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git
commit 3a510ce0da1aeb579ac3b9836aa39f4e84a5148a Author: Bertil Chapuis <[email protected]> AuthorDate: Thu Jun 13 00:29:59 2024 +0200 Rename variable --- .../org/apache/baremaps/data/collection/AppendOnlyLog.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/baremaps-data/src/main/java/org/apache/baremaps/data/collection/AppendOnlyLog.java b/baremaps-data/src/main/java/org/apache/baremaps/data/collection/AppendOnlyLog.java index 4051cedc..57df2f85 100644 --- a/baremaps-data/src/main/java/org/apache/baremaps/data/collection/AppendOnlyLog.java +++ b/baremaps-data/src/main/java/org/apache/baremaps/data/collection/AppendOnlyLog.java @@ -179,21 +179,21 @@ public class AppendOnlyLog<E> implements DataCollection<E> { ByteBuffer segment = memory.segment((int) segmentIndex); - int size; + int valueSize; try { - size = dataType.size(segment, (int) segmentOffset); + valueSize = dataType.size(segment, (int) segmentOffset); } catch (IndexOutOfBoundsException e) { - size = 0; + valueSize = 0; } - if (segmentOffset + size > segmentSize || size == 0) { + if (segmentOffset + valueSize > segmentSize || valueSize == 0) { segmentIndex = segmentIndex + 1; segmentOffset = 0; position = segmentIndex * segmentSize; segment = memory.segment((int) segmentIndex); - size = dataType.size(segment, (int) segmentOffset); + valueSize = dataType.size(segment, (int) segmentOffset); } - position += size; + position += valueSize; index++; return dataType.read(segment, (int) segmentOffset);
