Verified Commit 702a778b authored by Martin Raifer's avatar Martin Raifer
Browse files

drop useless parentheses

parent aebb4908
......@@ -120,7 +120,7 @@ public class CreateH2Extract {
"insert into metadata (key,value) values (?,?)")
) {
if (!cmdArgs.skipExtractRegionCheck) {
Geometry extractRegion = (new GeoJSONReader()).read(keytables.metadata("extract.region"));
Geometry extractRegion = new GeoJSONReader().read(keytables.metadata("extract.region"));
if (!extractRegion.contains(OSHDBGeometryBuilder.getGeometry(bbox))) {
System.err.println("error: bbox not fully contained in input region");
System.exit(2);
......@@ -141,7 +141,7 @@ public class CreateH2Extract {
Set<OSHDBTag> tags = new HashSet<>();
Set<OSHDBRole> roles = new HashSet<>();
TagTranslator tt = new TagTranslator(keytables.getConnection());
FilterExpression filter = (new FilterParser(tt)).parse(cmdArgs.filter != null
FilterExpression filter = new FilterParser(tt).parse(cmdArgs.filter != null
? cmdArgs.filter : "type:node or type:way or type:relation");
ScanQuery<Long, GridOSHEntity> scanQuery = new ScanQuery<>((key, cell) -> {
......@@ -297,7 +297,7 @@ public class CreateH2Extract {
String metadataValue = metadata.getString(2);
insertMetadata.setString(1, metadataKey);
if (metadataKey.equalsIgnoreCase("extract.region")) {
metadataValue = (new GeoJSONWriter())
metadataValue = new GeoJSONWriter()
.write(OSHDBGeometryBuilder.getGeometry(bbox)).toString();
}
if (metadataKey.startsWith("data.")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment