tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1360841 - in /tomcat/trunk/java/org/apache/catalina/authenticator: SavedRequest.java SingleSignOn.java
Date Thu, 12 Jul 2012 18:14:58 GMT
Author: markt
Date: Thu Jul 12 18:14:58 2012
New Revision: 1360841

URL: http://svn.apache.org/viewvc?rev=1360841&view=rev
Log:
Code clean-up for o.a.catalina.authenticator
 - Add final prompted by UCDetector
 - Java 7 use of <>

Modified:
    tomcat/trunk/java/org/apache/catalina/authenticator/SavedRequest.java
    tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java

Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SavedRequest.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/SavedRequest.java?rev=1360841&r1=1360840&r2=1360841&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/SavedRequest.java (original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/SavedRequest.java Thu Jul 12 18:14:58
2012
@@ -48,7 +48,7 @@ public final class SavedRequest {
     /**
      * The set of Cookies associated with this Request.
      */
-    private ArrayList<Cookie> cookies = new ArrayList<Cookie>();
+    private final ArrayList<Cookie> cookies = new ArrayList<>();
 
     public void addCookie(Cookie cookie) {
         cookies.add(cookie);
@@ -65,13 +65,12 @@ public final class SavedRequest {
      * values for this header.  The values are returned as an Iterator when
      * you ask for them.
      */
-    private HashMap<String,ArrayList<String>> headers =
-        new HashMap<String,ArrayList<String>>();
+    private final HashMap<String,ArrayList<String>> headers = new HashMap<>();
 
     public void addHeader(String name, String value) {
         ArrayList<String> values = headers.get(name);
         if (values == null) {
-            values = new ArrayList<String>();
+            values = new ArrayList<>();
             headers.put(name, values);
         }
         values.add(value);
@@ -93,7 +92,7 @@ public final class SavedRequest {
     /**
      * The set of Locales associated with this Request.
      */
-    private ArrayList<Locale> locales = new ArrayList<Locale>();
+    private final ArrayList<Locale> locales = new ArrayList<>();
 
     public void addLocale(Locale locale) {
         locales.add(locale);

Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java?rev=1360841&r1=1360840&r2=1360841&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java (original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java Thu Jul 12 18:14:58
2012
@@ -71,8 +71,7 @@ public class SingleSignOn extends ValveB
      * The cache of SingleSignOnEntry instances for authenticated Principals,
      * keyed by the cookie value that is used to select them.
      */
-    protected Map<String,SingleSignOnEntry> cache =
-        new HashMap<String,SingleSignOnEntry>();
+    protected final Map<String,SingleSignOnEntry> cache = new HashMap<>();
 
 
     /**
@@ -86,7 +85,7 @@ public class SingleSignOn extends ValveB
      * The cache of single sign on identifiers, keyed by the Session that is
      * associated with them.
      */
-    protected Map<Session,String> reverse = new HashMap<Session,String>();
+    protected final Map<Session,String> reverse = new HashMap<>();
 
 
     /**



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


Mime
View raw message