tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1380783 - in /tomcat/trunk/webapps/examples/WEB-INF/classes: dates/ examples/ jsp2/examples/ jsp2/examples/simpletag/ num/ sessions/ websocket/snake/
Date Tue, 04 Sep 2012 18:19:41 GMT
Author: markt
Date: Tue Sep  4 18:19:40 2012
New Revision: 1380783

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

Modified:
    tomcat/trunk/webapps/examples/WEB-INF/classes/dates/JspCalendar.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/examples/FooTag.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/BookBean.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/ShuffleSimpleTag.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/num/NumberGuessBean.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/Snake.java

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/dates/JspCalendar.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/dates/JspCalendar.java?rev=1380783&r1=1380782&r2=1380783&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/dates/JspCalendar.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/dates/JspCalendar.java Tue Sep  4 18:19:40
2012
@@ -20,7 +20,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/examples/FooTag.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/examples/FooTag.java?rev=1380783&r1=1380782&r2=1380783&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/examples/FooTag.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/examples/FooTag.java Tue Sep  4 18:19:40
2012
@@ -32,7 +32,7 @@ public class FooTag extends ExampleTagBa
 
     private static final long serialVersionUID = 1L;
 
-    private String atts[] = new String[3];
+    private final String atts[] = new String[3];
     int i = 0;
 
     private final void setAtt(int index, String value) {

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/BookBean.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/BookBean.java?rev=1380783&r1=1380782&r2=1380783&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/BookBean.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/BookBean.java Tue Sep  4 18:19:40
2012
@@ -19,9 +19,9 @@
 package jsp2.examples;
 
 public class BookBean {
-    private String title;
-    private String author;
-    private String isbn;
+    private final String title;
+    private final String author;
+    private final String isbn;
 
     public BookBean( String title, String author, String isbn ) {
         this.title = title;

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java?rev=1380783&r1=1380782&r2=1380783&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java
Tue Sep  4 18:19:40 2012
@@ -33,8 +33,8 @@ public class EchoAttributesTag
     extends SimpleTagSupport
     implements DynamicAttributes
 {
-    private ArrayList<String> keys = new ArrayList<>();
-    private ArrayList<Object> values = new ArrayList<>();
+    private final ArrayList<String> keys = new ArrayList<>();
+    private final ArrayList<Object> values = new ArrayList<>();
 
     @Override
     public void doTag() throws JspException, IOException {

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/ShuffleSimpleTag.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/ShuffleSimpleTag.java?rev=1380783&r1=1380782&r2=1380783&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/ShuffleSimpleTag.java
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/ShuffleSimpleTag.java
Tue Sep  4 18:19:40 2012
@@ -31,7 +31,7 @@ import javax.servlet.jsp.tagext.SimpleTa
  */
 public class ShuffleSimpleTag extends SimpleTagSupport {
     // No need for this to use SecureRandom
-    private static Random random = new Random();
+    private static final Random random = new Random();
 
     private JspFragment fragment1;
     private JspFragment fragment2;

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/num/NumberGuessBean.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/num/NumberGuessBean.java?rev=1380783&r1=1380782&r2=1380783&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/num/NumberGuessBean.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/num/NumberGuessBean.java Tue Sep  4 18:19:40
2012
@@ -32,7 +32,7 @@ public class NumberGuessBean implements 
     private String hint;
     private int numGuesses;
     private boolean success;
-    private Random random = new Random();
+    private final Random random = new Random();
 
     public NumberGuessBean() {
         reset();

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java?rev=1380783&r1=1380782&r2=1380783&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java Tue Sep  4 18:19:40
2012
@@ -19,7 +19,7 @@ package sessions;
 import java.util.Vector;
 
 public class DummyCart {
-    Vector<String> v = new Vector<>();
+    final Vector<String> v = new Vector<>();
     String submit = null;
     String item = null;
 

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/Snake.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/Snake.java?rev=1380783&r1=1380782&r2=1380783&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/Snake.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/Snake.java Tue Sep  4 18:19:40
2012
@@ -34,8 +34,8 @@ public class Snake {
     private Direction direction;
     private int length = DEFAULT_LENGTH;
     private Location head;
-    private Deque<Location> tail = new ArrayDeque<>();
-    private String hexColor;
+    private final Deque<Location> tail = new ArrayDeque<>();
+    private final String hexColor;
 
     public Snake(int id, WsOutbound outbound) {
         this.id = id;



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


Mime
View raw message