Author: markt
Date: Sat Jan 14 18:22:02 2012
New Revision: 1231547

URL: http://svn.apache.org/viewvc?rev=1231547&view=rev
Log:
Fix unused code warnings

Modified:
    
tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java

Modified: 
tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java?rev=1231547&r1=1231546&r2=1231547&view=diff
==============================================================================
--- 
tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
 (original)
+++ 
tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
 Sat Jan 14 18:22:02 2012
@@ -71,8 +71,7 @@ public class TestNonLoginAndBasicAuthent
      */
     @Test
     public void testAcceptPublicNonLogin() throws Exception {
-        doTestNonLogin(USER, PWD, CONTEXT_PATH_NOLOGIN + URI_PUBLIC,
-                        false, 200);
+        doTestNonLogin(CONTEXT_PATH_NOLOGIN + URI_PUBLIC, false, 200);
     }
 
     /*
@@ -82,8 +81,7 @@ public class TestNonLoginAndBasicAuthent
      */
     @Test
     public void testRejectProtectedNonLogin() throws Exception {
-        doTestNonLogin(USER, PWD, CONTEXT_PATH_NOLOGIN + URI_PROTECTED,
-                        true, 403);
+        doTestNonLogin(CONTEXT_PATH_NOLOGIN + URI_PROTECTED, true, 403);
     }
 
     /*
@@ -136,14 +134,13 @@ public class TestNonLoginAndBasicAuthent
     public void testBasicLoginRejectProtected() throws Exception {
         doTestBasic(USER, PWD, CONTEXT_PATH_LOGIN + URI_PROTECTED,
                 true, 401, false, 200);
-        doTestNonLogin(USER, PWD, CONTEXT_PATH_NOLOGIN + URI_PROTECTED,
+        doTestNonLogin(CONTEXT_PATH_NOLOGIN + URI_PROTECTED,
                 true, 403);
     }
 
 
-    public void doTestNonLogin(String user, String pwd, String uri,
-            boolean expectedReject, int expectedRC)
-            throws Exception {
+    public void doTestNonLogin(String uri, boolean expectedReject,
+            int expectedRC) throws Exception {
 
         Map<String,List<String>> reqHeaders =
                 new HashMap<String,List<String>>();
@@ -189,7 +186,7 @@ public class TestNonLoginAndBasicAuthent
         }
 
         // the second access attempt should be sucessful
-        String credentials = USER + ":" + PWD;
+        String credentials = user + ":" + pwd;
         byte[] credentialsBytes = ByteChunk.convertToBytes(credentials);
         String base64auth = Base64.encode(credentialsBytes);
         String authLine = "Basic " + base64auth;



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

Reply via email to