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.
This commit is contained in:
Henry Kupty 2021-05-18 19:55:34 +02:00
parent f92a4ee2f6
commit fca5de9004

View File

@ -258,8 +258,6 @@ final class PathParser {
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<Token> tokens = new ArrayList<Token>();
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) {