tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1645743 - in /tomcat/trunk/test/org/apache: catalina/startup/TomcatBaseTest.java coyote/ajp/TestAbstractAjpProcessor.java
Date Mon, 15 Dec 2014 20:40:37 GMT
Author: rjung
Date: Mon Dec 15 20:40:37 2014
New Revision: 1645743

URL: http://svn.apache.org/r1645743
Log:
Use Map instead of HashMap in RequestDescriptor.

Modified:
    tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
    tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1645743&r1=1645742&r2=1645743&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Mon Dec 15 20:40:37
2014
@@ -239,46 +239,46 @@ public abstract class TomcatBaseTest ext
 
     public static final class RequestDescriptor {
 
-        private final HashMap<String, String> requestInfo =
+        private final Map<String, String> requestInfo =
             new HashMap<String, String>();
-        private final HashMap<String, String> contextInitParameters =
+        private final Map<String, String> contextInitParameters =
             new HashMap<String, String>();
-        private final HashMap<String, String> contextAttributes =
+        private final Map<String, String> contextAttributes =
             new HashMap<String, String>();
-        private final HashMap<String, String> headers =
+        private final Map<String, String> headers =
             new HashMap<String, String>();
-        private final HashMap<String, String> attributes =
+        private final Map<String, String> attributes =
             new HashMap<String, String>();
-        private final HashMap<String, String> params =
+        private final Map<String, String> params =
             new HashMap<String, String>();
-        private final HashMap<String, String> sessionAttributes =
+        private final Map<String, String> sessionAttributes =
             new HashMap<String, String>();
 
-        public HashMap<String, String> getRequestInfo() {
+        public Map<String, String> getRequestInfo() {
             return requestInfo;
         }
 
-        public HashMap<String, String> getContextInitParameters() {
+        public Map<String, String> getContextInitParameters() {
             return contextInitParameters;
         }
 
-        public HashMap<String, String> getContextAttributes() {
+        public Map<String, String> getContextAttributes() {
             return contextAttributes;
         }
 
-        public HashMap<String, String> getHeaders() {
+        public Map<String, String> getHeaders() {
             return headers;
         }
 
-        public HashMap<String, String> getAttributes() {
+        public Map<String, String> getAttributes() {
             return attributes;
         }
 
-        public HashMap<String, String> getParams() {
+        public Map<String, String> getParams() {
             return params;
         }
 
-        public HashMap<String, String> getSessionAttributes() {
+        public Map<String, String> getSessionAttributes() {
             return sessionAttributes;
         }
 
@@ -339,8 +339,8 @@ public abstract class TomcatBaseTest ext
         }
 
         public void compare (RequestDescriptor request) {
-            HashMap<String, String> base;
-            HashMap<String, String> cmp;
+            Map<String, String> base;
+            Map<String, String> cmp;
             base = request.getRequestInfo();
             cmp = this.getRequestInfo();
             for (String name: base.keySet()) {

Modified: tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java?rev=1645743&r1=1645742&r2=1645743&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java (original)
+++ tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java Mon Dec 15 20:40:37
2014
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
@@ -64,12 +65,12 @@ public class TestAbstractAjpProcessor ex
 
     private void doSnoopTest(RequestDescriptor desc) throws Exception {
 
-        HashMap<String, String> requestInfo = desc.getRequestInfo();
-        HashMap<String, String> contextInitParameters = desc.getContextInitParameters();
-        HashMap<String, String> contextAttributes = desc.getContextAttributes();
-        HashMap<String, String> headers = desc.getHeaders();
-        HashMap<String, String> attributes = desc.getAttributes();
-        HashMap<String, String> params = desc.getParams();
+        Map<String, String> requestInfo = desc.getRequestInfo();
+        Map<String, String> contextInitParameters = desc.getContextInitParameters();
+        Map<String, String> contextAttributes = desc.getContextAttributes();
+        Map<String, String> headers = desc.getHeaders();
+        Map<String, String> attributes = desc.getAttributes();
+        Map<String, String> params = desc.getParams();
 
         Tomcat tomcat = getTomcatInstance();
 
@@ -89,7 +90,7 @@ public class TestAbstractAjpProcessor ex
         }
 
         String value;
-        HashMap<String, String> savedRequestInfo = new HashMap<String, String>();
+        Map<String, String> savedRequestInfo = new HashMap<String, String>();
         for (String name: requestInfo.keySet()) {
             value = requestInfo.get(name);
             switch (name) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message