Skip to content

Commit

Permalink
Fix sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bchapuis committed Jun 26, 2024
1 parent ef725f6 commit 52e92f7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public static GeometryOffsets writeGeometryPart(
if (mls.getNumGeometries() > 1) {
go.ends = new long[mls.getNumGeometries()];
for (int i = 0; i < mls.getNumGeometries(); i++) {
go.ends[i] = end += mls.getGeometryN(i).getNumPoints();
end += mls.getGeometryN(i).getNumPoints();
go.ends[i] = end;
}
}
} else if (geometryType == GeometryType.Polygon) {
Expand All @@ -65,7 +66,8 @@ public static GeometryOffsets writeGeometryPart(
int end = p.getExteriorRing().getNumPoints();
go.ends[0] = end;
for (int i = 0; i < p.getNumInteriorRing(); i++) {
go.ends[i + 1] = end += p.getInteriorRingN(i).getNumPoints();
end += p.getInteriorRingN(i).getNumPoints();
go.ends[i + 1] = end;
}
} else if (geometryType == GeometryType.MultiPolygon) {
MultiPolygon mp = (MultiPolygon) geometry;
Expand Down

0 comments on commit 52e92f7

Please sign in to comment.