You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/04/17 13:14:41 UTC

[tomcat] branch master updated: Fix checkstyle nags

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new 19c1bbf  Fix checkstyle nags
19c1bbf is described below

commit 19c1bbf9ec9cb602a311dc88413b60a7dc587f11
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Apr 17 14:14:23 2020 +0100

    Fix checkstyle nags
---
 .../websocket/TestWsWebSocketContainerGetOpenSessions.java    | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java b/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java
index 0dad184..c6802ba 100644
--- a/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java
+++ b/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java
@@ -21,6 +21,7 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.HashMap;
 import java.util.Map;
+
 import jakarta.servlet.ServletContextEvent;
 import jakarta.websocket.ClientEndpointConfig;
 import jakarta.websocket.CloseReason;
@@ -356,7 +357,7 @@ public class TestWsWebSocketContainerGetOpenSessions extends WebSocketBaseTest {
         private static final Map<String, Integer> records = new HashMap<>();
         private static int updateCount = 0;
 
-        public synchronized static void addRecord(String key, int count) {
+        public static synchronized void addRecord(String key, int count) {
             // Need to avoid out of order updates to the Map. If out of order
             // updates occur, keep the one with the highest count.
             Integer oldCount = records.get(key);
@@ -366,7 +367,7 @@ public class TestWsWebSocketContainerGetOpenSessions extends WebSocketBaseTest {
             updateCount++;
         }
 
-        public synchronized static boolean checkRecord(String key, int expectedCount) {
+        public static synchronized boolean checkRecord(String key, int expectedCount) {
             Integer actualCount = records.get(key);
             if (actualCount == null) {
                 if (expectedCount == 0) {
@@ -379,16 +380,16 @@ public class TestWsWebSocketContainerGetOpenSessions extends WebSocketBaseTest {
             }
         }
 
-        public synchronized static int getUpdateCount() {
+        public static synchronized int getUpdateCount() {
             return updateCount;
         }
 
-        public synchronized static void reset() {
+        public static synchronized void reset() {
             records.clear();
             updateCount = 0;
         }
 
-        public synchronized static String dump() {
+        public static synchronized String dump() {
             return records.toString();
         }
     }


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