This is an automated email from the ASF dual-hosted git repository. jsorel pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 387c4e100190f1bd32d0ea5200f1a45067d7ff5f Author: jsorel <johann.so...@geomatys.com> AuthorDate: Fri Jan 10 15:32:26 2025 +0100 Fix shapefile record reader not skipping trailing bytes --- .../main/org/apache/sis/storage/shapefile/shp/ShapeRecord.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/shp/ShapeRecord.java b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/shp/ShapeRecord.java index a0cdad14aa..620ebbbfc2 100644 --- a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/shp/ShapeRecord.java +++ b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/shp/ShapeRecord.java @@ -82,10 +82,8 @@ public final class ShapeRecord { channel.buffer.order(ByteOrder.LITTLE_ENDIAN); final int shapeType = channel.readInt(); final boolean match = io.decode(channel,this, filter); - if (!match) { - //move to record end - channel.seek(position + byteSize); - } + //always move to record end, size is sometime larger then the geometry bytes + channel.seek(position + byteSize); return match; }