This is an automated email from the ASF dual-hosted git repository.

bchapuis pushed a commit to branch 619-transformation-workflow
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git

commit 5ebc24b87fe00644db8627a96e9505eb7b714b2d
Author: Bertil Chapuis <[email protected]>
AuthorDate: Fri Apr 7 23:49:12 2023 +0200

    Fix index out of bounds exception
---
 .../main/java/org/apache/baremaps/workflow/tasks/EntityDataType.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/EntityDataType.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/EntityDataType.java
index f9c9a2de..027762d3 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/EntityDataType.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/EntityDataType.java
@@ -15,6 +15,7 @@ package org.apache.baremaps.workflow.tasks;
 import java.nio.ByteBuffer;
 import java.util.Map;
 import org.apache.baremaps.collection.type.*;
+import org.apache.baremaps.collection.type.geometry.GeometryDataType;
 import org.locationtech.jts.geom.Geometry;
 
 public class EntityDataType implements DataType<Entity> {
@@ -29,7 +30,8 @@ public class EntityDataType implements DataType<Entity> {
   @Override
   public int size(Entity value) {
     int size = 0;
-    size += idType.size();
+    size += Integer.BYTES;
+    size += idType.size(value.getId());
     size += tagsType.size(value.getTags());
     size += geometryType.size(value.getGeometry());
     return size;

Reply via email to