Skip to content

Commit

Permalink
add brackets for multiline if for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Sparing committed Jan 11, 2024
1 parent 5956cb2 commit 991199b
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ object MosaicPolygonJTS extends GeometryReader {
}
val holes = extractedLines.tail
.map({ h: MosaicLineStringJTS =>
if (h.asSeq.head.coord == h.asSeq.last.coord) h.asSeq.map(_.coord).toArray
else h.asSeq.map(_.coord).toArray ++ Array(h.asSeq.head.coord)
if (h.asSeq.head.coord == h.asSeq.last.coord) {
h.asSeq.map(_.coord).toArray
} else {
h.asSeq.map(_.coord).toArray ++ Array(h.asSeq.head.coord)

Check warning on line 107 in src/main/scala/com/databricks/labs/mosaic/core/geometry/polygon/MosaicPolygonJTS.scala

View check run for this annotation

Codecov / codecov/patch

src/main/scala/com/databricks/labs/mosaic/core/geometry/polygon/MosaicPolygonJTS.scala#L107

Added line #L107 was not covered by tests
}
})
.map(gf.createLinearRing)
.toArray
Expand Down

0 comments on commit 991199b

Please sign in to comment.