From 8a7f50f3a6f1569d68bde3303930b0cc188a9e23 Mon Sep 17 00:00:00 2001 From: TacoTheDank Date: Thu, 19 Nov 2020 15:22:46 -0500 Subject: [PATCH] Performance: Set replaceable with EnumSet --- .../src/main/java/net/osmand/util/OpeningHoursParser.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/util/OpeningHoursParser.java b/OsmAnd-java/src/main/java/net/osmand/util/OpeningHoursParser.java index 01fee5cd9e..f87a1d4d4e 100644 --- a/OsmAnd-java/src/main/java/net/osmand/util/OpeningHoursParser.java +++ b/OsmAnd-java/src/main/java/net/osmand/util/OpeningHoursParser.java @@ -6,6 +6,7 @@ import java.text.DateFormatSymbols; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; +import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -1812,7 +1813,7 @@ public class OpeningHoursParser { TokenType currentParse = TokenType.TOKEN_UNKNOWN; TokenType currentParseParent = TokenType.TOKEN_UNKNOWN; List listOfPairs = new ArrayList<>(); - Set presentTokens = new HashSet<>(); + Set presentTokens = EnumSet.noneOf(TokenType.class); Token[] currentPair = new Token[2]; listOfPairs.add(currentPair); Token prevToken = null;