From 0c735881c2d0bf0e3e148222e45c3efef1010850 Mon Sep 17 00:00:00 2001 From: thesnowgoose Date: Sat, 2 Apr 2016 10:31:54 -0700 Subject: [PATCH] Replaced LinkedList for ArrayList --- .../src/main/java/org/eclipse/jetty/util/URIUtil.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java b/jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java index b0c75a0f795..dc17ce9b96a 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java @@ -20,10 +20,7 @@ package org.eclipse.jetty.util; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; -import java.util.ListIterator; +import java.util.*; import java.util.regex.Pattern; import org.eclipse.jetty.util.Utf8Appendable.NotUtf8Exception; @@ -515,9 +512,9 @@ public class URIUtil if(path.startsWith("/..")) return null; - List directories = new LinkedList<>(); + List directories = new ArrayList<>(); Collections.addAll(directories, __PATH_SPLIT.split(path)); - + for(ListIterator iterator = directories.listIterator(); iterator.hasNext();) { switch (iterator.next()) {