Skip to content

Commit

Permalink
Remove no-op
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Nov 5, 2024
1 parent ed33630 commit 65f40af
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public class OsmWithTags {

private static final Set<String> LEVEL_TAGS = Set.of("level", "layer");
private static final Set<String> DEFAULT_LEVEL = Set.of("0");
private static final Consumer<String> NO_OP = x -> {};

/* To save memory this is only created when an entity actually has tags. */
private Map<String, String> tags;
Expand Down Expand Up @@ -225,7 +224,7 @@ public OptionalInt getTagAsInt(String tag, Consumer<String> errorHandler) {
* Some tags are allowed to have values like 55, "true" or "false".
*/
public OptionalInt parseIntOrBoolean(String tag, Consumer<String> errorHandler) {
var maybeInt = getTagAsInt(tag, NO_OP);
var maybeInt = getTagAsInt(tag, errorHandler);
if (maybeInt.isPresent()) {
return maybeInt;
} else {
Expand Down

0 comments on commit 65f40af

Please sign in to comment.