tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1380331 - in /tomcat/trunk/webapps/examples/WEB-INF/classes: cal/ chat/ compressionFilters/ jsp2/examples/simpletag/ sessions/ websocket/chat/ websocket/snake/
Date Mon, 03 Sep 2012 20:02:24 GMT
Author: markt
Date: Mon Sep  3 20:02:24 2012
New Revision: 1380331

URL: http://svn.apache.org/viewvc?rev=1380331&view=rev
Log:
Clean-up
- Java 7 <>

Modified:
    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/CompressionServletResponseWrapper.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/chat/ChatWebSocketServlet.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/Snake.java
    tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/SnakeWebSocketServlet.java

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=1380331&r1=1380330&r2=1380331&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java Mon Sep  3 20:02:24 2012
@@ -31,7 +31,7 @@ public class TableBean {
     boolean processError = false;
 
     public TableBean() {
-        this.table = new Hashtable<String, Entries>(10);
+        this.table = new Hashtable<>(10);
         this.JspCal = new JspCalendar();
         this.date = JspCal.getCurrentDate();
     }

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=1380331&r1=1380330&r2=1380331&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java Mon Sep  3 20:02:24
2012
@@ -43,8 +43,7 @@ public class ChatServlet
 
     private static final String CHARSET = "UTF-8";
 
-    protected ArrayList<HttpServletResponse> connections =
-        new ArrayList<HttpServletResponse>();
+    protected ArrayList<HttpServletResponse> connections = new ArrayList<>();
     protected transient MessageSender messageSender = null;
 
     @Override
@@ -193,7 +192,7 @@ public class ChatServlet
     public class MessageSender implements Runnable {
 
         protected boolean running = true;
-        protected ArrayList<String> messages = new ArrayList<String>();
+        protected 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=1380331&r1=1380330&r2=1380331&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java
Mon Sep  3 20:02:24 2012
@@ -117,7 +117,7 @@ public class CompressionFilter implement
 
             str = filterConfig.getInitParameter("compressionMimeTypes");
             if (str!=null) {
-                List<String> values = new ArrayList<String>();
+                List<String> values = new ArrayList<>();
                 StringTokenizer st = new StringTokenizer(str, ",");
 
                 while (st.hasMoreTokens()) {

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=1380331&r1=1380330&r2=1380331&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java
Mon Sep  3 20:02:24 2012
@@ -94,7 +94,7 @@ public class CompressionServletResponseW
     /**
      * keeps a copy of all headers set
      */
-    private Map<String,String> headerCopies = new HashMap<String,String>();
+    private Map<String,String> headerCopies = new HashMap<>();
 
 
     // --------------------------------------------------------- Public Methods

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=1380331&r1=1380330&r2=1380331&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
Mon Sep  3 20:02:24 2012
@@ -33,8 +33,8 @@ public class EchoAttributesTag
     extends SimpleTagSupport
     implements DynamicAttributes
 {
-    private ArrayList<String> keys = new ArrayList<String>();
-    private ArrayList<Object> values = new ArrayList<Object>();
+    private ArrayList<String> keys = new ArrayList<>();
+    private ArrayList<Object> values = new ArrayList<>();
 
     @Override
     public void doTag() throws JspException, IOException {

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=1380331&r1=1380330&r2=1380331&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java Mon Sep  3 20:02:24
2012
@@ -19,7 +19,7 @@ package sessions;
 import java.util.Vector;
 
 public class DummyCart {
-    Vector<String> v = new Vector<String>();
+    Vector<String> v = new Vector<>();
     String submit = null;
     String item = null;
 

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/chat/ChatWebSocketServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/chat/ChatWebSocketServlet.java?rev=1380331&r1=1380330&r2=1380331&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/chat/ChatWebSocketServlet.java
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/chat/ChatWebSocketServlet.java
Mon Sep  3 20:02:24 2012
@@ -43,7 +43,7 @@ public class ChatWebSocketServlet extend
 
     private final AtomicInteger connectionIds = new AtomicInteger(0);
     private final Set<ChatMessageInbound> connections =
-            new CopyOnWriteArraySet<ChatMessageInbound>();
+            new CopyOnWriteArraySet<>();
 
     @Override
     protected StreamInbound createWebSocketInbound(String subProtocol,

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=1380331&r1=1380330&r2=1380331&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 Mon Sep  3 20:02:24
2012
@@ -34,7 +34,7 @@ public class Snake {
     private Direction direction;
     private int length = DEFAULT_LENGTH;
     private Location head;
-    private Deque<Location> tail = new ArrayDeque<Location>();
+    private Deque<Location> tail = new ArrayDeque<>();
     private String hexColor;
 
     public Snake(int id, WsOutbound outbound) {

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/SnakeWebSocketServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/SnakeWebSocketServlet.java?rev=1380331&r1=1380330&r2=1380331&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/SnakeWebSocketServlet.java
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/SnakeWebSocketServlet.java
Mon Sep  3 20:02:24 2012
@@ -62,9 +62,9 @@ public class SnakeWebSocketServlet exten
 
     private final AtomicInteger connectionIds = new AtomicInteger(0);
     private final ConcurrentHashMap<Integer, Snake> snakes =
-            new ConcurrentHashMap<Integer, Snake>();
+            new ConcurrentHashMap<>();
     private final ConcurrentHashMap<Integer, SnakeMessageInbound> connections =
-            new ConcurrentHashMap<Integer, SnakeMessageInbound>();
+            new ConcurrentHashMap<>();
 
     @Override
     public void init() throws ServletException {



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


Mime
View raw message