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 2016/02/02 10:55:24 UTC

svn commit: r1728062 - in /tomcat/tc7.0.x/trunk/test/org/apache: catalina/filters/ catalina/tribes/test/transport/ tomcat/util/http/mapper/ tomcat/websocket/

Author: markt
Date: Tue Feb  2 09:55:24 2016
New Revision: 1728062

URL: http://svn.apache.org/viewvc?rev=1728062&view=rev
Log:
Clean-up. Reduce IDE warnings

Modified:
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestRestCsrfPreventionFilter.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketReceive.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketSend.java
    tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapper.java
    tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterEchoServer.java

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestRestCsrfPreventionFilter.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestRestCsrfPreventionFilter.java?rev=1728062&r1=1728061&r2=1728062&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestRestCsrfPreventionFilter.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestRestCsrfPreventionFilter.java Tue Feb  2 09:55:24 2016
@@ -28,7 +28,6 @@ import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpSessionContext;
 
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
@@ -375,7 +374,8 @@ public class TestRestCsrfPreventionFilte
         }
 
         @Override
-        public HttpSessionContext getSessionContext() {
+        @Deprecated
+        public javax.servlet.http.HttpSessionContext getSessionContext() {
             return null;
         }
 

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketReceive.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketReceive.java?rev=1728062&r1=1728061&r2=1728062&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketReceive.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketReceive.java Tue Feb  2 09:55:24 2016
@@ -70,7 +70,6 @@ public class SocketReceive {
                 printStats(start, mb, count, df, total);
             }
         }
-
     }
 
     private static void printStats(long start, double mb, int count, DecimalFormat df, BigDecimal total) {

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketSend.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketSend.java?rev=1728062&r1=1728061&r2=1728062&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketSend.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketSend.java Tue Feb  2 09:55:24 2016
@@ -65,6 +65,6 @@ public class SocketSend {
         out.flush();
         System.out.println("Complete, sleeping 5 seconds");
         Thread.sleep(5000);
-
+        socket.close();
     }
 }

Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapper.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapper.java?rev=1728062&r1=1728061&r2=1728062&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapper.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapper.java Tue Feb  2 09:55:24 2016
@@ -69,11 +69,11 @@ public class TestMapper extends LoggingB
         welcomes[1] = "bobou";
 
         mapper.addContextVersion("iowejoiejfoiew", "blah7", "",
-                "0", "context0", new String[0], null, null);
+                "0", "context0", new String[0], null, null, false, false);
         mapper.addContextVersion("iowejoiejfoiew", "blah7", "/foo",
-                "0", "context1", new String[0], null, null);
+                "0", "context1", new String[0], null, null, false, false);
         mapper.addContextVersion("iowejoiejfoiew", "blah7", "/foo/bar",
-                "0", "context2", welcomes, null, null);
+                "0", "context2", welcomes, null, null, false, false);
 
         Collection<WrapperMappingInfo> wrappersForContext1 = Arrays
                 .asList(new WrapperMappingInfo[] { new WrapperMappingInfo("/",
@@ -121,7 +121,9 @@ public class TestMapper extends LoggingB
                 new String[0],
                 null,
                 Arrays.asList(new WrapperMappingInfo[] { new WrapperMappingInfo(
-                        "/bobou/*", "wrapper7", false, false) }));
+                        "/bobou/*", "wrapper7", false, false) }),
+                false,
+                false);
     }
 
     @Test
@@ -174,7 +176,7 @@ public class TestMapper extends LoggingB
 
         assertEquals(16, mapper.hosts.length);
         mapper.addContextVersion("zzzz", hostZ, "/", "", contextZ, null, null,
-                null);
+                null, false, false);
         assertEquals(17, mapper.hosts.length);
 
         mapper.addHost("zzzz", new String[] { "zzzz_alias1", "zzzz_alias2" },
@@ -317,7 +319,9 @@ public class TestMapper extends LoggingB
                 null,
                 null,
                 Arrays.asList(new WrapperMappingInfo[] { new WrapperMappingInfo(
-                        "/", "newContext-default", false, false) }));
+                        "/", "newContext-default", false, false) }),
+                false,
+                false);
 
         assertEquals(2, mappedContext.versions.length);
         assertEquals("0", mappedContext.versions[0].name);
@@ -357,7 +361,9 @@ public class TestMapper extends LoggingB
                 null,
                 null,
                 Arrays.asList(new WrapperMappingInfo[] { new WrapperMappingInfo(
-                        "/", "newContext-defaultWrapper2", false, false) }));
+                        "/", "newContext-defaultWrapper2", false, false) }),
+                false,
+                false);
         mappedContext = mappedHost.contextList.contexts[contextPos];
 
         assertEquals(contextPath, mappedContext.name);
@@ -427,7 +433,9 @@ public class TestMapper extends LoggingB
                 null,
                 null,
                 Arrays.asList(new WrapperMappingInfo[] { new WrapperMappingInfo(
-                        "/", "newDefaultWrapper", false, false) }));
+                        "/", "newDefaultWrapper", false, false) }),
+                false,
+                false);
 
         mappedContext = mappedHost.contextList.contexts[contextPos];
         assertEquals(contextPath, mappedContext.name);
@@ -454,15 +462,15 @@ public class TestMapper extends LoggingB
         mapper.setDefaultHostName("localhost");
 
         mapper.addContextVersion("localhost", host, "", "0", contextRoot,
-                new String[0], null, null);
+                new String[0], null, null, false, false);
         mapper.addContextVersion("localhost", host, "/foo", "0", context1,
-                new String[0], null, null);
+                new String[0], null, null, false, false);
         mapper.addContextVersion("localhost", host, "/foo/bar", "0", context2,
-                new String[0], null, null);
+                new String[0], null, null, false, false);
         mapper.addContextVersion("localhost", host, "/foo/bar/bla", "0",
-                context3, new String[0], null, null);
+                context3, new String[0], null, null, false, false);
         mapper.addContextVersion("localhost", host, "/foo/bar/bla/baz", "0",
-                context4, new String[0], null, null);
+                context4, new String[0], null, null, false, false);
 
         final AtomicBoolean running = new AtomicBoolean(true);
         Thread t = new Thread() {
@@ -473,7 +481,7 @@ public class TestMapper extends LoggingB
                             "/foo/bar/bla/baz", "0");
                     mapper.addContextVersion("localhost", host,
                             "/foo/bar/bla/baz", "0", context4, new String[0],
-                            null, null);
+                            null, null, false, false);
                 }
                 running.set(false);
             }

Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterEchoServer.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterEchoServer.java?rev=1728062&r1=1728061&r2=1728062&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterEchoServer.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterEchoServer.java Tue Feb  2 09:55:24 2016
@@ -192,7 +192,7 @@ public class TesterEchoServer {
     public static class RootEcho {
 
         @OnMessage
-        public void echoTextMessage(Session session, @SuppressWarnings("unused") String msg) {
+        public void echoTextMessage(Session session, String msg) {
             try {
                 session.getBasicRemote().sendText(msg);
             } catch (IOException e) {



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