tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1380715 - in /tomcat/trunk/webapps/examples/WEB-INF/classes: cal/ chat/ compressionFilters/
Date Tue, 04 Sep 2012 16:06:53 GMT
Author: markt
Date: Tue Sep  4 16:06:53 2012
New Revision: 1380715

URL: http://svn.apache.org/viewvc?rev=1380715&view=rev
Log:
Clean-up - UCDetector use of final

Modified:
    tomcat/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java?rev=1380715&r1=1380714&r2=1380715&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java Tue Sep  4 16:06:53
2012
@@ -21,7 +21,7 @@ import java.util.Calendar;
 import java.util.Date;
 
 public class JspCalendar {
-    Calendar  calendar = null;
+    final Calendar  calendar;
 
     public JspCalendar() {
         calendar = Calendar.getInstance();

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java?rev=1380715&r1=1380714&r2=1380715&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java Tue Sep  4 16:06:53 2012
@@ -22,8 +22,8 @@ import javax.servlet.http.HttpServletReq
 
 public class TableBean {
 
-    Hashtable<String, Entries> table;
-    JspCalendar JspCal;
+    final Hashtable<String, Entries> table;
+    final JspCalendar JspCal;
     Entries entries;
     String date;
     String name = null;

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java?rev=1380715&r1=1380714&r2=1380715&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java Tue Sep  4 16:06:53
2012
@@ -43,7 +43,8 @@ public class ChatServlet
 
     private static final String CHARSET = "UTF-8";
 
-    protected ArrayList<HttpServletResponse> connections = new ArrayList<>();
+    protected final ArrayList<HttpServletResponse> connections =
+            new ArrayList<>();
     protected transient MessageSender messageSender = null;
 
     @Override
@@ -192,7 +193,7 @@ public class ChatServlet
     public class MessageSender implements Runnable {
 
         protected boolean running = true;
-        protected ArrayList<String> messages = new ArrayList<>();
+        protected final ArrayList<String> messages = new ArrayList<>();
 
         public MessageSender() {
             // Default contructor

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java?rev=1380715&r1=1380714&r2=1380715&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java
Tue Sep  4 16:06:53 2012
@@ -49,7 +49,7 @@ public class CompressionFilter implement
     /**
      * Minimal reasonable threshold.
      */
-    private int minThreshold = 128;
+    private final int minThreshold = 128;
 
     /**
      * The threshold number to compress.
@@ -59,7 +59,7 @@ public class CompressionFilter implement
     /**
      * Minimal reasonable buffer.
      */
-    private int minBuffer = 8192;  // 8KB is what tomcat would use by default anyway
+    private final int minBuffer = 8192;  // 8KB is what tomcat would use by default anyway
 
     /**
      * The compression buffer size to avoid chunking.

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java?rev=1380715&r1=1380714&r2=1380715&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java
Tue Sep  4 16:06:53 2012
@@ -99,17 +99,17 @@ public class CompressionResponseStream e
      * The content length past which we will not write, or -1 if there is
      * no defined content length.
      */
-    protected int length = -1;
+    protected final int length = -1;
 
     /**
      * The response with which this servlet output stream is associated.
      */
-    protected CompressionServletResponseWrapper response = null;
+    protected final CompressionServletResponseWrapper response;
 
     /**
      * The underlying servlet output stream to which we should write data.
      */
-    protected ServletOutputStream output = null;
+    protected final ServletOutputStream output;
 
 
     // --------------------------------------------------------- Public Methods

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java?rev=1380715&r1=1380714&r2=1380715&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java
Tue Sep  4 16:06:53 2012
@@ -56,7 +56,7 @@ public class CompressionServletResponseW
     /**
      * Original response
      */
-    protected HttpServletResponse origResponse = null;
+    protected final HttpServletResponse origResponse;
 
     /**
      * The ServletOutputStream that has been returned by
@@ -94,7 +94,7 @@ public class CompressionServletResponseW
     /**
      * keeps a copy of all headers set
      */
-    private Map<String,String> headerCopies = new HashMap<>();
+    private final Map<String,String> headerCopies = new HashMap<>();
 
 
     // --------------------------------------------------------- Public Methods



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


Mime
View raw message