This is an automated email from the ASF dual-hosted git repository. schultz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 1b83f52 Use ArrayList instead of Vector. 1b83f52 is described below commit 1b83f52aea261f0f349bef689354ffaac2d51483 Author: Christopher Schultz <ch...@christopherschultz.net> AuthorDate: Wed May 8 22:36:32 2019 +0200 Use ArrayList instead of Vector. --- java/org/apache/catalina/connector/Response.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/connector/Response.java b/java/org/apache/catalina/connector/Response.java index 0df7e00..8fefce9 100644 --- a/java/org/apache/catalina/connector/Response.java +++ b/java/org/apache/catalina/connector/Response.java @@ -34,7 +34,6 @@ import java.util.Enumeration; import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.Vector; import java.util.function.Supplier; import javax.servlet.ServletOutputStream; @@ -867,10 +866,9 @@ public class Response implements HttpServletResponse { @Override public Collection<String> getHeaderNames() { - MimeHeaders headers = getCoyoteResponse().getMimeHeaders(); int n = headers.size(); - List<String> result = new ArrayList<>(n); + ArrayList<String> result = new ArrayList<>(n); for (int i = 0; i < n; i++) { result.add(headers.getName(i).toString()); } @@ -881,12 +879,11 @@ public class Response implements HttpServletResponse { @Override public Collection<String> getHeaders(String name) { - Enumeration<String> enumeration = getCoyoteResponse().getMimeHeaders().values(name); - Vector<String> result = new Vector<>(); + ArrayList<String> result = new ArrayList<>(); while (enumeration.hasMoreElements()) { - result.addElement(enumeration.nextElement()); + result.add(enumeration.nextElement()); } return result; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org