tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r1794684 [2/2] - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/catalina/core/ java/org/apache/catalina/ha/backend/ java/org/apache/catalina/ha/session/ java/org/apache/catalina/loader/ java/org/apache/catalina/manage...
Date Wed, 10 May 2017 08:26:06 GMT
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1794684&r1=1794683&r2=1794684&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Wed May 10 08:26:05
2017
@@ -36,7 +36,6 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -613,9 +612,7 @@ public class WsWebSocketContainer implem
         result.put(HTTP_VERSION_BYTES);
 
         // Headers
-        Iterator<Entry<String,List<String>>> iter = reqHeaders.entrySet().iterator();
-        while (iter.hasNext()) {
-            Entry<String,List<String>> entry = iter.next();
+        for (Entry<String, List<String>> entry : reqHeaders.entrySet()) {
             addHeader(result, entry.getKey(), entry.getValue());
         }
 

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsWriteTimeout.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsWriteTimeout.java?rev=1794684&r1=1794683&r2=1794684&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsWriteTimeout.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsWriteTimeout.java Wed May 10 08:26:05
2017
@@ -17,7 +17,6 @@
 package org.apache.tomcat.websocket.server;
 
 import java.util.Comparator;
-import java.util.Iterator;
 import java.util.Set;
 import java.util.concurrent.ConcurrentSkipListSet;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -48,9 +47,7 @@ public class WsWriteTimeout implements B
             backgroundProcessCount = 0;
 
             long now = System.currentTimeMillis();
-            Iterator<WsRemoteEndpointImplServer> iter = endpoints.iterator();
-            while (iter.hasNext()) {
-                WsRemoteEndpointImplServer endpoint = iter.next();
+            for (WsRemoteEndpointImplServer endpoint : endpoints) {
                 if (endpoint.getTimeoutExpiry() < now) {
                     // Background thread, not the thread that triggered the
                     // write so no need to use a dispatch

Modified: tomcat/trunk/webapps/manager/WEB-INF/jsp/sessionsList.jsp
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/manager/WEB-INF/jsp/sessionsList.jsp?rev=1794684&r1=1794683&r2=1794684&view=diff
==============================================================================
--- tomcat/trunk/webapps/manager/WEB-INF/jsp/sessionsList.jsp (original)
+++ tomcat/trunk/webapps/manager/WEB-INF/jsp/sessionsList.jsp Wed May 10 08:26:05 2017
@@ -17,7 +17,6 @@
 --%>
 <%@page session="false" contentType="text/html; charset=ISO-8859-1" %>
 <%@page import="java.util.Collection" %>
-<%@page import="java.util.Iterator" %>
 <%@page import="org.apache.catalina.manager.JspHelper" %>
 <%@page import="org.apache.catalina.Session" %>
 <%@page import="org.apache.catalina.ha.session.DeltaSession" %>
@@ -34,7 +33,7 @@
    String submitUrl = JspHelper.escapeXml(response.encodeURL(
            ((HttpServletRequest) pageContext.getRequest()).getRequestURI() +
            "?path=" + path + "&version=" + version));
-   Collection activeSessions = (Collection) request.getAttribute("activeSessions");
+   Collection<Session> activeSessions = (Collection<Session>) request.getAttribute("activeSessions");
 %>
 <head>
     <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
@@ -101,9 +100,8 @@
             </tfoot>
             <% } // end if %>
             <tbody>
-<% Iterator iter = activeSessions.iterator();
-   while (iter.hasNext()) {
-       Session currentSession = (Session) iter.next();
+<%
+    for (Session currentSession : activeSessions) {
        String currentSessionId = JspHelper.escapeXml(currentSession.getId());
        String type;
        if (currentSession instanceof DeltaSession) {



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


Mime
View raw message