cmlenz      2003/06/29 07:57:53

  Modified:    integration/ant/src/java/org/apache/cactus/ant
                        EnhydraRun.java ResinRun.java
                        AbstractServerRun.java
               integration/ant/src/java/org/apache/cactus/integration/ant/deployment
                        WebXmlIo.java ApplicationXmlIo.java
               integration/ant/src/test/org/apache/cactus/integration/ant
                        AntTestCase.java
  Log:
  Avoid direct printing to System.out/System.err
  
  Revision  Changes    Path
  1.2       +15 -2     
jakarta-cactus/integration/ant/src/java/org/apache/cactus/ant/EnhydraRun.java
  
  Index: EnhydraRun.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/ant/EnhydraRun.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EnhydraRun.java   21 May 2003 11:04:18 -0000      1.1
  +++ EnhydraRun.java   29 Jun 2003 14:57:53 -0000      1.2
  @@ -56,6 +56,8 @@
    */
   package org.apache.cactus.ant;
   
  +import java.io.PrintStream;
  +
   /**
    * Starts/stop Enhydra by setting up a listener socket.
    *
  @@ -77,10 +79,21 @@
       public EnhydraRun(String[] theArgs)
       {
           super(theArgs);
  -        System.err.println("The class "
  +        logDeprecation(System.err, "The class "
               + "'org.apache.cactus.ant.EnhydraRun' is deprecated. Use "
               + "'org.apache.cactus.integration.ant.container.enhydra.EnhydraRun'"
               + " instead");
  +    }
  +
  +    /**
  +     * Prints the specified deprecation message to the output stream.
  +     * 
  +     * @param theOut The output stream
  +     * @param theMessage The deprecation message
  +     */
  +    private void logDeprecation(PrintStream theOut, String theMessage)
  +    {
  +        theOut.println(theMessage);
       }
   
   }
  
  
  
  1.2       +15 -2     
jakarta-cactus/integration/ant/src/java/org/apache/cactus/ant/ResinRun.java
  
  Index: ResinRun.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/ant/ResinRun.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResinRun.java     21 May 2003 11:04:18 -0000      1.1
  +++ ResinRun.java     29 Jun 2003 14:57:53 -0000      1.2
  @@ -56,6 +56,8 @@
    */
   package org.apache.cactus.ant;
   
  +import java.io.PrintStream;
  +
   /**
    * Starts/stop Resin by setting up a listener socket.
    *
  @@ -78,10 +80,21 @@
       public ResinRun(String[] theArgs)
       {
           super(theArgs);
  -        System.err.println("The class "
  +        logDeprecation(System.err, "The class "
               + "'org.apache.cactus.ant.ResinRun' is deprecated. Use "
               + "'org.apache.cactus.integration.ant.container.resin.ResinRun' "
               + "instead");
  +    }
  +
  +    /**
  +     * Prints the specified deprecation message to the output stream.
  +     * 
  +     * @param theOut The output stream
  +     * @param theMessage The deprecation message
  +     */
  +    private void logDeprecation(PrintStream theOut, String theMessage)
  +    {
  +        theOut.println(theMessage);
       }
   
   }
  
  
  
  1.2       +15 -2     
jakarta-cactus/integration/ant/src/java/org/apache/cactus/ant/AbstractServerRun.java
  
  Index: AbstractServerRun.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/ant/AbstractServerRun.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractServerRun.java    21 May 2003 11:04:18 -0000      1.1
  +++ AbstractServerRun.java    29 Jun 2003 14:57:53 -0000      1.2
  @@ -56,6 +56,8 @@
    */
   package org.apache.cactus.ant;
   
  +import java.io.PrintStream;
  +
   /**
    * Abstract class for starting/stopping an application server. When this
    * application is first called to start the server, a listener socket is
  @@ -79,10 +81,21 @@
       public AbstractServerRun(String[] theArgs)
       {
           super(theArgs);
  -        System.err.println("The class "
  +        logDeprecation(System.err, "The class "
               + "'org.apache.cactus.ant.AbstractServerRun' is deprecated. Use "
               + "'org.apache.cactus.integration.ant.container.AbstractServerRun' "
               + "instead");
  +    }
  +
  +    /**
  +     * Prints the specified deprecation message to the output stream.
  +     * 
  +     * @param theOut The output stream
  +     * @param theMessage The deprecation message
  +     */
  +    private void logDeprecation(PrintStream theOut, String theMessage)
  +    {
  +        theOut.println(theMessage);
       }
   
   }
  
  
  
  1.4       +1 -3      
jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/deployment/WebXmlIo.java
  
  Index: WebXmlIo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/deployment/WebXmlIo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WebXmlIo.java     14 May 2003 13:14:30 -0000      1.3
  +++ WebXmlIo.java     29 Jun 2003 14:57:53 -0000      1.4
  @@ -115,8 +115,6 @@
                       return new InputSource(in);
                   }
               }
  -            System.err.println("Resource for public ID " + thePublicId
  -                + " not found");
               return null;
           }
   
  
  
  
  1.4       +1 -3      
jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/deployment/ApplicationXmlIo.java
  
  Index: ApplicationXmlIo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/deployment/ApplicationXmlIo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ApplicationXmlIo.java     14 May 2003 13:14:30 -0000      1.3
  +++ ApplicationXmlIo.java     29 Jun 2003 14:57:53 -0000      1.4
  @@ -110,8 +110,6 @@
                       return new InputSource(in);
                   }
               }
  -            System.err.println("Resource for public ID " + thePublicId
  -                + " not found");
               return null;
           }
   
  
  
  
  1.9       +2 -2      
jakarta-cactus/integration/ant/src/test/org/apache/cactus/integration/ant/AntTestCase.java
  
  Index: AntTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/integration/ant/src/test/org/apache/cactus/integration/ant/AntTestCase.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AntTestCase.java  11 Jun 2003 16:16:41 -0000      1.8
  +++ AntTestCase.java  29 Jun 2003 14:57:53 -0000      1.9
  @@ -216,7 +216,7 @@
               }
               catch (BuildException be)
               {
  -                System.err.println("Exception in tearDown: " + be.getMessage());
  +                // exception has been logged
               }
           }
       }
  
  
  

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

Reply via email to