vmassol     02/02/22 15:11:43

  Modified:    src/ant/org/apache/cactus/ant AbstractServerRun.java
               src/framework/share/org/apache/cactus AbstractTestCase.java
               src/test/share/org/apache/cactus
                        TestAbstractTestCase_InterceptorTestCase.java
                        TestAll.java TestServletURL.java
                        TestServletUtil.java
  Log:
  corrected some checkstyle reported errors
  
  Revision  Changes    Path
  1.8       +7 -2      
jakarta-cactus/src/ant/org/apache/cactus/ant/AbstractServerRun.java
  
  Index: AbstractServerRun.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/src/ant/org/apache/cactus/ant/AbstractServerRun.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractServerRun.java    16 Feb 2002 23:25:49 -0000      1.7
  +++ AbstractServerRun.java    22 Feb 2002 23:11:42 -0000      1.8
  @@ -70,7 +70,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Robert Leftwich</a>
    *
  - * @version $Id: AbstractServerRun.java,v 1.7 2002/02/16 23:25:49 vmassol Exp $
  + * @version $Id: AbstractServerRun.java,v 1.8 2002/02/22 23:11:42 vmassol Exp $
    */
   public abstract class AbstractServerRun extends Thread
   {
  @@ -106,12 +106,16 @@
   
       /**
        * Starts the server (in a blocking mode) and set up a socket listener.
  +     *
  +     * @exception Exception if any error happens when starting the server
        */
       abstract protected void doStartServer() throws Exception;
   
       /**
        * Stops the server by connecting to the socket set up when the server
        * was started.
  +     *
  +     * @exception Exception if any error happens when stopping the server
        */
       abstract protected void doStopServer() throws Exception;
   
  @@ -239,11 +243,12 @@
               throw new RuntimeException("Cannot close server socket [" +
                   serverSocket + "]");
           }
  -
       }
   
       /**
        * Sets up the listener socket.
  +     *
  +     * @return the listener socket that has been set up
        */
       private ServerSocket setUpListenerSocket()
       {
  
  
  
  1.26      +4 -3      
jakarta-cactus/src/framework/share/org/apache/cactus/AbstractTestCase.java
  
  Index: AbstractTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/AbstractTestCase.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- AbstractTestCase.java     17 Feb 2002 19:00:10 -0000      1.25
  +++ AbstractTestCase.java     22 Feb 2002 23:11:42 -0000      1.26
  @@ -78,7 +78,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: AbstractTestCase.java,v 1.25 2002/02/17 19:00:10 vmassol Exp $
  + * @version $Id: AbstractTestCase.java,v 1.26 2002/02/22 23:11:42 vmassol Exp $
    */
   public abstract class AbstractTestCase extends TestCase
   {
  @@ -377,7 +377,8 @@
        * which, in our case, need to be ran in the servlet engine by the
        * servlet redirector class.
        *
  -     * @exception Throwable if any exception is thrown
  +     * @exception Throwable if any exception is thrown during the test. Any
  +     *            exception will be displayed by the JUnit Test Runner
        */
       public void runBare() throws Throwable
       {
  @@ -410,7 +411,7 @@
        * Cactus redirection servlet.
        *
        * @exception Throwable any error that occurred when calling the test method
  -     *         for the current test case.
  +     *            for the current test case.
        */
       protected abstract void runTest() throws Throwable;
   
  
  
  
  1.15      +30 -8     
jakarta-cactus/src/test/share/org/apache/cactus/TestAbstractTestCase_InterceptorTestCase.java
  
  Index: TestAbstractTestCase_InterceptorTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/src/test/share/org/apache/cactus/TestAbstractTestCase_InterceptorTestCase.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TestAbstractTestCase_InterceptorTestCase.java     17 Feb 2002 23:36:42 -0000     
 1.14
  +++ TestAbstractTestCase_InterceptorTestCase.java     22 Feb 2002 23:11:43 -0000     
 1.15
  @@ -70,7 +70,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: TestAbstractTestCase_InterceptorTestCase.java,v 1.14 2002/02/17 
23:36:42 vmassol Exp $
  + * @version $Id: TestAbstractTestCase_InterceptorTestCase.java,v 1.15 2002/02/22 
23:11:43 vmassol Exp $
    */
   public class TestAbstractTestCase_InterceptorTestCase
       extends AbstractTestCase
  @@ -88,6 +88,10 @@
       /**
        * Override default method so that configuration checks are not run during
        * these unit tests.
  +     *
  +     * @exception Throwable if any exception is thrown during the test. Any
  +     *            exception will be displayed by the JUnit Test Runner
  +     * @see AbstractTestCase#runBare()
        */
       public void runBare() throws Throwable
       {
  @@ -96,6 +100,10 @@
   
       /**
        * Intercepts running test cases to check for normal exceptions.
  +     *
  +     * @exception Throwable any error that occurred when calling the test method
  +     *            for the current test case.
  +     * @see AbstractTestCase#runTest()
        */
       protected void runTest() throws Throwable
       {
  @@ -126,7 +134,9 @@
               // Test that when a begin method for a given test does not have the
               // correct return type (i.e. void), a
               // <code>AssertionFailedError</code> exception is returned.
  -            if (this.getCurrentTestMethod().equals("testBeginMethodBadReturnType")) 
{
  +            if (this.getCurrentTestMethod().equals(
  +                    "testBeginMethodBadReturnType")) {
  +
                   assertEquals("The begin method " +
                       "[beginBeginMethodBadReturnType] should return void and " +
                       "not [java.lang.String]", e.getMessage());
  @@ -135,7 +145,9 @@
   
               // Test that when a begin method for a given test is not declared
               // public a <code>AssertionFailedError</code> exception is returned.
  -            if (this.getCurrentTestMethod().equals("testBeginMethodNotPublic")) {
  +            if (this.getCurrentTestMethod().equals(
  +                    "testBeginMethodNotPublic")) {
  +
                   assertEquals("Method [beginBeginMethodNotPublic] should be " +
                       "declared public", e.getMessage());
                   return;
  @@ -144,7 +156,9 @@
               // Test that when a begin method for a given test has the wrong
               // type of parameters, a <code>AssertionFailedError</code> exception
               // is returned.
  -            if (this.getCurrentTestMethod().equals("testBeginMethodBadParamType")) {
  +            if (this.getCurrentTestMethod().equals(
  +                    "testBeginMethodBadParamType")) {
  +
                   assertEquals("The begin method " +
                       "[beginBeginMethodBadParamType] must accept a single " +
                       "parameter derived from class " +
  @@ -157,7 +171,9 @@
               // Test that when a begin method for a given test has the wrong
               // number of parameters, a <code>AssertionFailedError</code>
               // exception is returned.
  -            if 
(this.getCurrentTestMethod().equals("testBeginMethodBadParamNumber")) {
  +            if (this.getCurrentTestMethod().equals(
  +                    "testBeginMethodBadParamNumber")) {
  +
                   assertEquals("The begin method " +
                       "[beginBeginMethodBadParamNumber] must accept a single " +
                       "parameter derived from class " +
  @@ -179,7 +195,9 @@
               // Test that when an end method for a given test does not have the
               // correct return type (i.e. void), a
               // <code>AssertionFailedError</code> exception is returned.
  -            if (this.getCurrentTestMethod().equals("testEndMethodBadReturnType")) {
  +            if (this.getCurrentTestMethod().equals(
  +                    "testEndMethodBadReturnType")) {
  +
                   assertEquals("The end method " +
                       "[endEndMethodBadReturnType] should return void and " +
                       "not [java.lang.String]", e.getMessage());
  @@ -197,7 +215,9 @@
               // Test that when an end method for a given test has the wrong
               // type of parameters, a <code>AssertionFailedError</code> exception
               // is returned.
  -            if (this.getCurrentTestMethod().equals("testEndMethodBadParamType")) {
  +            if (this.getCurrentTestMethod().equals(
  +                    "testEndMethodBadParamType")) {
  +
                   assertEquals("The end method [endEndMethodBadParamType] " +
                       "has a bad parameter of type [java.lang.String]",
                       e.getMessage());
  @@ -207,7 +227,9 @@
               // Test that when an end method for a given test has the wrong
               // number of parameters, a <code>AssertionFailedError</code>
               // exception is returned.
  -            if (this.getCurrentTestMethod().equals("testEndMethodBadParamNumber")) {
  +            if (this.getCurrentTestMethod().equals(
  +                    "testEndMethodBadParamNumber")) {
  +
                   assertEquals("The end method [endEndMethodBadParamNumber] " +
                       "must only have a single parameter", e.getMessage());
                   return;
  
  
  
  1.11      +8 -5      jakarta-cactus/src/test/share/org/apache/cactus/TestAll.java
  
  Index: TestAll.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/src/test/share/org/apache/cactus/TestAll.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TestAll.java      2 Feb 2002 17:54:38 -0000       1.10
  +++ TestAll.java      22 Feb 2002 23:11:43 -0000      1.11
  @@ -1,4 +1,6 @@
   /*
  + * ====================================================================
  + *
    * The Apache Software License, Version 1.1
    *
    * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  @@ -23,10 +25,10 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "Cactus", and "Apache Software
  - *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written
  - *    permission, please contact [EMAIL PROTECTED]
  + * 4. The names "The Jakarta Project", "Cactus" and "Apache Software
  + *    Foundation" must not be used to endorse or promote products
  + *    derived from this software without prior written permission. For
  + *    written permission, please contact [EMAIL PROTECTED]
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  @@ -50,6 +52,7 @@
    * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  + *
    */
   package org.apache.cactus;
   
  @@ -64,7 +67,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: TestAll.java,v 1.10 2002/02/02 17:54:38 vmassol Exp $
  + * @version $Id: TestAll.java,v 1.11 2002/02/22 23:11:43 vmassol Exp $
    */
   public class TestAll extends TestCase
   {
  
  
  
  1.4       +8 -5      
jakarta-cactus/src/test/share/org/apache/cactus/TestServletURL.java
  
  Index: TestServletURL.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/src/test/share/org/apache/cactus/TestServletURL.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestServletURL.java       2 Feb 2002 17:54:38 -0000       1.3
  +++ TestServletURL.java       22 Feb 2002 23:11:43 -0000      1.4
  @@ -1,4 +1,6 @@
   /*
  + * ====================================================================
  + *
    * The Apache Software License, Version 1.1
    *
    * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  @@ -23,10 +25,10 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "Cactus", and "Apache Software
  - *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written
  - *    permission, please contact [EMAIL PROTECTED]
  + * 4. The names "The Jakarta Project", "Cactus" and "Apache Software
  + *    Foundation" must not be used to endorse or promote products
  + *    derived from this software without prior written permission. For
  + *    written permission, please contact [EMAIL PROTECTED]
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  @@ -50,6 +52,7 @@
    * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  + *
    */
   package org.apache.cactus;
   
  @@ -64,7 +67,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: TestServletURL.java,v 1.3 2002/02/02 17:54:38 vmassol Exp $
  + * @version $Id: TestServletURL.java,v 1.4 2002/02/22 23:11:43 vmassol Exp $
    */
   public class TestServletURL extends TestCase
   {
  
  
  
  1.4       +8 -5      
jakarta-cactus/src/test/share/org/apache/cactus/TestServletUtil.java
  
  Index: TestServletUtil.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/src/test/share/org/apache/cactus/TestServletUtil.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestServletUtil.java      2 Feb 2002 17:54:38 -0000       1.3
  +++ TestServletUtil.java      22 Feb 2002 23:11:43 -0000      1.4
  @@ -1,4 +1,6 @@
   /*
  + * ====================================================================
  + *
    * The Apache Software License, Version 1.1
    *
    * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  @@ -23,10 +25,10 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "Cactus", and "Apache Software
  - *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written
  - *    permission, please contact [EMAIL PROTECTED]
  + * 4. The names "The Jakarta Project", "Cactus" and "Apache Software
  + *    Foundation" must not be used to endorse or promote products
  + *    derived from this software without prior written permission. For
  + *    written permission, please contact [EMAIL PROTECTED]
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  @@ -50,6 +52,7 @@
    * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  + *
    */
   package org.apache.cactus;
   
  @@ -65,7 +68,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: TestServletUtil.java,v 1.3 2002/02/02 17:54:38 vmassol Exp $
  + * @version $Id: TestServletUtil.java,v 1.4 2002/02/22 23:11:43 vmassol Exp $
    */
   public class TestServletUtil extends TestCase
   {
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to