diff --git a/planetiler-core/src/main/java/com/onthegomap/planetiler/Planetiler.java b/planetiler-core/src/main/java/com/onthegomap/planetiler/Planetiler.java index 59eef64fb3..817467d024 100644 --- a/planetiler-core/src/main/java/com/onthegomap/planetiler/Planetiler.java +++ b/planetiler-core/src/main/java/com/onthegomap/planetiler/Planetiler.java @@ -495,10 +495,9 @@ public Planetiler addParquetSource(String name, List paths, boolean hivePa for (var path : paths) { inputPaths.add(new InputPath(name, path, false)); } - return addStage(name, "Process features in " + paths, ifSourceUsed(name, () -> { - new ParquetReader(name, profile, stats, getId, getLayer, hivePartitioning).process(paths, featureGroup, - config); - })); + return addStage(name, "Process features in " + paths, + ifSourceUsed(name, () -> new ParquetReader(name, profile, stats, getId, getLayer, hivePartitioning) + .process(paths, featureGroup, config))); } /** diff --git a/planetiler-core/src/main/java/com/onthegomap/planetiler/reader/parquet/GeoArrow.java b/planetiler-core/src/main/java/com/onthegomap/planetiler/reader/parquet/GeoArrow.java index d935ab689d..32b404ca74 100644 --- a/planetiler-core/src/main/java/com/onthegomap/planetiler/reader/parquet/GeoArrow.java +++ b/planetiler-core/src/main/java/com/onthegomap/planetiler/reader/parquet/GeoArrow.java @@ -20,6 +20,8 @@ * coordinate lists to JTS geometries. */ class GeoArrow { + private GeoArrow() {} + // TODO create packed coordinate arrays while reading parquet values to avoid creating so many intermediate objects static MultiPolygon multipolygon(List>> list) { return GeoUtils.createMultiPolygon(map(list, GeoArrow::polygon)); diff --git a/planetiler-core/src/main/java/com/onthegomap/planetiler/reader/parquet/MapRecordMaterializer.java b/planetiler-core/src/main/java/com/onthegomap/planetiler/reader/parquet/MapRecordMaterializer.java index 2de7ee0a75..b5e0470c75 100644 --- a/planetiler-core/src/main/java/com/onthegomap/planetiler/reader/parquet/MapRecordMaterializer.java +++ b/planetiler-core/src/main/java/com/onthegomap/planetiler/reader/parquet/MapRecordMaterializer.java @@ -345,7 +345,9 @@ public void start() { } @Override - public void end() {} + public void end() { + // don't need to do anything + } } private abstract static class Primitive extends PrimitiveConverter { diff --git a/planetiler-core/src/main/java/org/apache/hadoop/io/compress/Lz4Codec.java b/planetiler-core/src/main/java/org/apache/hadoop/io/compress/Lz4Codec.java index 14ea73af6e..cab23a1515 100644 --- a/planetiler-core/src/main/java/org/apache/hadoop/io/compress/Lz4Codec.java +++ b/planetiler-core/src/main/java/org/apache/hadoop/io/compress/Lz4Codec.java @@ -5,4 +5,5 @@ * {@link org.apache.parquet.hadoop.metadata.CompressionCodecName} to allow deserializing parquet files that use lz4 * compression. */ +@SuppressWarnings("java:S2176") public class Lz4Codec extends io.airlift.compress.lz4.Lz4Codec {} diff --git a/planetiler-core/src/main/java/org/apache/parquet/filter2/predicate/Filters.java b/planetiler-core/src/main/java/org/apache/parquet/filter2/predicate/Filters.java index 62bc6272b2..b268257327 100644 --- a/planetiler-core/src/main/java/org/apache/parquet/filter2/predicate/Filters.java +++ b/planetiler-core/src/main/java/org/apache/parquet/filter2/predicate/Filters.java @@ -8,6 +8,8 @@ * their constructors are package-private. */ public class Filters { + private Filters() {} + public static Operators.DoubleColumn doubleColumn(List parts) { return new Operators.DoubleColumn(ColumnPath.get(parts.toArray(String[]::new))); } diff --git a/planetiler-core/src/test/java/com/onthegomap/planetiler/reader/parquet/ParquetInputFileTest.java b/planetiler-core/src/test/java/com/onthegomap/planetiler/reader/parquet/ParquetInputFileTest.java index 389e031650..994b1dc42b 100644 --- a/planetiler-core/src/test/java/com/onthegomap/planetiler/reader/parquet/ParquetInputFileTest.java +++ b/planetiler-core/src/test/java/com/onthegomap/planetiler/reader/parquet/ParquetInputFileTest.java @@ -89,6 +89,7 @@ void testReadBostonWithBboxFilterNotCovering(Path path) { } @TestFactory + @SuppressWarnings("java:S5961") List testReadAllDataTypes() { /* diff --git a/planetiler-core/src/test/java/com/onthegomap/planetiler/util/GlobTest.java b/planetiler-core/src/test/java/com/onthegomap/planetiler/util/GlobTest.java index 05ea6583f0..7033f6068c 100644 --- a/planetiler-core/src/test/java/com/onthegomap/planetiler/util/GlobTest.java +++ b/planetiler-core/src/test/java/com/onthegomap/planetiler/util/GlobTest.java @@ -44,8 +44,9 @@ void testWalkPathWithPattern() throws IOException { Files.writeString(path, "test"); assertEquals(List.of(path), Glob.of(tmpDir).resolve("a", "*", "c.txt").find()); System.err.println(Glob.of(tmpDir).resolve("*", "*", "c.txt")); - System.err.println(Glob.of(tmpDir).resolve("**", "c.txt")); - System.err.println(Glob.of(tmpDir).resolve("*", "b", "c.txt")); + System.err.println(Glob.of(tmpDir).resolve("*", "*", "c.txt").find()); + System.err.println(Glob.of(tmpDir).resolve("**", "c.txt").find()); + System.err.println(Glob.of(tmpDir).resolve("*", "b", "c.txt").find()); assertEquals(List.of(path), Glob.of(tmpDir).resolve("*", "*", "c.txt").find()); assertEquals(List.of(path), Glob.of(tmpDir).resolve("a", "b", "c.txt").find()); }