diff --git a/src/main/java/org/openmaptiles/layers/Poi.java b/src/main/java/org/openmaptiles/layers/Poi.java index 93052676..e7e65240 100644 --- a/src/main/java/org/openmaptiles/layers/Poi.java +++ b/src/main/java/org/openmaptiles/layers/Poi.java @@ -215,7 +215,7 @@ public void finish(String sourceName, FeatureCollector.Factory featureCollectors for (var aggStopSet : aggStops.values()) { if (aggStopSet.size() == 1) { - processAggStop(aggStopSet.get(0), featureCollectors, emit, 1); + processAggStop(aggStopSet.getFirst(), featureCollectors, emit, 1); continue; } @@ -244,7 +244,8 @@ public void finish(String sourceName, FeatureCollector.Factory featureCollectors } } catch (GeometryException e) { e.log(stats, "agg_stop_geometry_1", - "Error getting geometry for some of the stops with UIC ref. " + aggStopSet.get(0).uicRef() + " (agg_stop)"); + "Error getting geometry for some of the stops with UIC ref. " + aggStopSet.getFirst().uicRef() + + " (agg_stop)"); // we're not able to calculate agg_stop, so simply dump the stops as they are nearest = null; }