From 08ee4dad47bf539fea08b92fa5c9b3f86586f759 Mon Sep 17 00:00:00 2001 From: Peter Hanecak Date: Tue, 12 Dec 2023 10:52:59 +0100 Subject: [PATCH] duplicate houcenumber processing simplified further --- src/main/java/org/openmaptiles/layers/Housenumber.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/openmaptiles/layers/Housenumber.java b/src/main/java/org/openmaptiles/layers/Housenumber.java index 4d54481b..2d53c42a 100644 --- a/src/main/java/org/openmaptiles/layers/Housenumber.java +++ b/src/main/java/org/openmaptiles/layers/Housenumber.java @@ -46,7 +46,6 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE import java.util.Arrays; import java.util.Comparator; import java.util.List; -import java.util.Optional; import java.util.function.Predicate; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -147,11 +146,9 @@ public List postProcess(int zoom, List l var items = list.stream() .collect(Collectors.groupingBy(f -> f.attrs().get(TEMP_PARTITION))) .values().stream() - .map( - g -> g.stream().min(BY_TEMP_HAS_NAME) + .flatMap( + g -> g.stream().min(BY_TEMP_HAS_NAME).stream() ) - .filter(Optional::isPresent) - .map(Optional::get) .toList(); // remove temporary attributes