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 2014/01/09 14:45:55 UTC

svn commit: r1556806 - /tomcat/trunk/test/javax/servlet/http/TestCookie.java

Author: markt
Date: Thu Jan  9 13:45:54 2014
New Revision: 1556806

URL: http://svn.apache.org/r1556806
Log:
Suppress unused code warnings

Modified:
    tomcat/trunk/test/javax/servlet/http/TestCookie.java

Modified: tomcat/trunk/test/javax/servlet/http/TestCookie.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/javax/servlet/http/TestCookie.java?rev=1556806&r1=1556805&r2=1556806&view=diff
==============================================================================
--- tomcat/trunk/test/javax/servlet/http/TestCookie.java (original)
+++ tomcat/trunk/test/javax/servlet/http/TestCookie.java Thu Jan  9 13:45:54 2014
@@ -83,53 +83,63 @@ public class TestCookie {
 
     @Test(expected = IllegalArgumentException.class)
     public void leadingDollar() {
-        new Cookie("$Version", null);
+        @SuppressWarnings("unused")
+        Cookie c = new Cookie("$Version", null);
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void tokenVersion() {
-        new Cookie("Version", null);
+        @SuppressWarnings("unused")
+        Cookie c = new Cookie("Version", null);
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void attributeVersion() {
-        new Cookie("Comment", null);
+        @SuppressWarnings("unused")
+        Cookie c = new Cookie("Comment", null);
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void attributeDiscard() {
-        new Cookie("Discard", null);
+        @SuppressWarnings("unused")
+        Cookie c = new Cookie("Discard", null);
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void attributeExpires() {
-        new Cookie("Expires", null);
+        @SuppressWarnings("unused")
+        Cookie c = new Cookie("Expires", null);
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void attributeMaxAge() {
-        new Cookie("Max-Age", null);
+        @SuppressWarnings("unused")
+        Cookie c = new Cookie("Max-Age", null);
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void attributeDomain() {
-        new Cookie("Domain", null);
+        @SuppressWarnings("unused")
+        Cookie c = new Cookie("Domain", null);
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void attributePath() {
-        new Cookie("Path", null);
+        @SuppressWarnings("unused")
+        Cookie c = new Cookie("Path", null);
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void attributeSecure() {
-        new Cookie("Secure", null);
+        @SuppressWarnings("unused")
+        Cookie c = new Cookie("Secure", null);
     }
 
     @Ignore("HttpOnly is not checked for")
     @Test(expected = IllegalArgumentException.class)
     public void attributeHttpOnly() {
-        new Cookie("HttpOnly", null);
+        @SuppressWarnings("unused")
+        Cookie c = new Cookie("HttpOnly", null);
     }
 
     public static void checkCharInName(BitSet allowed) {
@@ -138,7 +148,8 @@ public class TestCookie {
             String name = "X" + ch + "X";
             Boolean actual;
             try {
-                new Cookie(name, null);
+                @SuppressWarnings("unused")
+                Cookie c = new Cookie(name, null);
                 actual = Boolean.TRUE;
             } catch (IllegalArgumentException e) {
                 actual = Boolean.FALSE;



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