From fca5de9004b432007774ed5a7e5c118fce81acfd Mon Sep 17 00:00:00 2001 From: Henry Kupty Date: Tue, 18 May 2021 19:55:34 +0200 Subject: [PATCH] Remove unnecessary array Usage of this array seems to have been dropped by #280, but the array remained. Cleaning up so it doesn't allocate the array needlessly anymore. Fixes #730. --- config/src/main/java/com/typesafe/config/impl/PathParser.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/src/main/java/com/typesafe/config/impl/PathParser.java b/config/src/main/java/com/typesafe/config/impl/PathParser.java index 8961cb711..0c41812c4 100644 --- a/config/src/main/java/com/typesafe/config/impl/PathParser.java +++ b/config/src/main/java/com/typesafe/config/impl/PathParser.java @@ -258,8 +258,6 @@ private static boolean looksUnsafeForFastParser(String s) { private static Path fastPathBuild(Path tail, String s, int end) { // lastIndexOf takes last index it should look at, end - 1 not end int splitAt = s.lastIndexOf('.', end - 1); - ArrayList tokens = new ArrayList(); - tokens.add(Tokens.newUnquotedText(null, s)); // this works even if splitAt is -1; then we start the substring at 0 Path withOneMoreElement = new Path(s.substring(splitAt + 1, end), tail); if (splitAt < 0) {