Skip to content

Commit

Permalink
clean-up: get(0) replaced with getFirst()
Browse files Browse the repository at this point in the history
  • Loading branch information
phanecak-maptiler committed Dec 12, 2023
1 parent 08ee4da commit c8c4b24
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/openmaptiles/layers/Poi.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit c8c4b24

Please sign in to comment.