Fix some Eclipse warnings in the tests
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 18 Dec 2009 17:34:43 +0000 (17:34 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 18 Dec 2009 17:34:43 +0000 (17:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@892321 13f79535-47bb-0310-9956-ffa450edef68

test/org/apache/catalina/connector/TestKeepAliveCount.java
test/org/apache/catalina/connector/TestRequest.java
test/org/apache/catalina/ha/session/TestSerializablePrincipal.java
test/org/apache/catalina/ha/session/TesterPrincipal.java
test/org/apache/catalina/startup/TestWebXml.java

index 97e9b9a..00e86bc 100644 (file)
@@ -46,7 +46,7 @@ public class TestKeepAliveCount extends TomcatBaseTest{
 
         private boolean init;
         
-        private synchronized void init() throws Exception {
+        private synchronized void init() {
             if (init) return;
             
             Tomcat tomcat = getTomcatInstance();
index 7b2d276..0df0df3 100644 (file)
@@ -44,7 +44,7 @@ public class TestRequest extends TomcatBaseTest {
      * any of the {@link HttpServletRequest} getParameterXXX() methods if the
      * request is chunked.
      */
-    public void testBug37794() throws Exception {
+    public void testBug37794() {
         Bug37794Client client = new Bug37794Client();
         client.setPort(getPort());
 
index 8323bf9..02f74cd 100644 (file)
@@ -36,6 +36,7 @@ public class TestSerializablePrincipal extends TestCase {
     /**
      * Simple serialization / de-serialization test for bug 43840.
      */
+    @SuppressWarnings("null")
     public void testWriteReadPrincipal() {
         // Get a temporary file to use for the serialization test
         File file = null;
index 774f310..8daf8cb 100644 (file)
@@ -22,6 +22,8 @@ import java.security.Principal;
 
 public class TesterPrincipal implements Principal, Serializable {
     
+    private static final long serialVersionUID = 1L;
+
     private String name;
 
     public TesterPrincipal(String theName) {
index a09c6df..6952acb 100644 (file)
@@ -232,14 +232,14 @@ public class TestWebXml extends TestCase {
         a.addBeforeOrder("b");
         b.addBeforeOrder("a");
 
-        Exception e = null;
+        Exception exception = null;
         
         try {
             WebXml.orderWebFragments(app, fragments);
         } catch (Exception e1) {
-            e = e1;
+            exception = e1;
         }
         
-        assertTrue(e instanceof IllegalArgumentException);
+        assertTrue(exception instanceof IllegalArgumentException);
     }
 }