commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/latka/src/java/org/apache/commons/latka Latka.java
Date Tue, 29 Jan 2002 16:59:51 GMT
dion        02/01/29 08:59:51

  Modified:    latka/src/java/org/apache/commons/latka Latka.java
  Log:
  Fixed more formatting and javadocs
  
  Revision  Changes    Path
  1.30      +14 -10    jakarta-commons/latka/src/java/org/apache/commons/latka/Latka.java
  
  Index: Latka.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/Latka.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- Latka.java	29 Jan 2002 16:53:51 -0000	1.29
  +++ Latka.java	29 Jan 2002 16:59:51 -0000	1.30
  @@ -107,7 +107,7 @@
    * @author Morgan Delagrange
    * @author dIon Gillard
    *
  - * @version $Revision: 1.29 $
  + * @version $Revision: 1.30 $
    */
   public class Latka {
   
  @@ -141,6 +141,7 @@
        *
        * @param suite test suite to execute
        * @param listener target for test events
  +     * @throws LatkaException when any internal error occurs
        *
        * @see XMLReporter XML-based implementation of LatkaEventInfo
        */
  @@ -170,7 +171,7 @@
   
               XMLReader reader = parser.getXMLReader();
   
  -            SuiteHandler handler = new SuiteHandler(reader,listener);
  +            SuiteHandler handler = new SuiteHandler(reader, listener);
   
               reader.setContentHandler(handler);
               reader.setErrorHandler(handler);
  @@ -197,6 +198,10 @@
           _isValidating = isValidating;
       }
   
  +    /**
  +     * Set the URL to be used when transforming XML generated by the XMLReporter
  +     * @param url a valid URL referencing a stylesheet 
  +     */
       public void setReportStylesheet(URL url) {
           _reportStylesheetUrl = url;
       }
  @@ -222,7 +227,7 @@
           SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMdd'-'HHmm");
           Date currentTime_1 = new Date();
           String dateString = formatter.format(currentTime_1);
  -        File file = new File(dir,dateString+".xml");
  +        File file = new File(dir, dateString + ".xml");
           FileWriter fileWriter = new FileWriter(file);
           fileWriter.write(xml);
           fileWriter.close();
  @@ -259,7 +264,7 @@
               TransformerFactory.newInstance().newTransformer(xslSource);
               StreamSource xmlSource = new StreamSource(new StringReader(xml));
               StreamResult result = new StreamResult(output);
  -            transformer.transform(xmlSource,result);
  +            transformer.transform(xmlSource, result);
               return output.toString();
           } catch (TransformerException e) {
               throw new LatkaException(e);
  @@ -273,9 +278,8 @@
        *
        * @param args arguments passed into the main(String[]) method
        *
  -     * @throws LatkaException
  -     *   if any problems are encountered during the execution
  -     *   of the tests
  +     * @throws LatkaException if any problems are encountered during
  +     * the execution of the tests
        */
       protected void runCommandLine(String args[]) throws LatkaException {
   
  @@ -290,9 +294,9 @@
               for (int i = 1; i < args.length; ++i) {
                   String arg = args[i];
                   if (arg.startsWith("prop:")) {
  -                    String propName = arg.substring(5,arg.indexOf("="));
  -                    String propValue = arg.substring(arg.indexOf("=")+1);
  -                    _props.setProperty(propName,propValue);
  +                    String propName = arg.substring(5, arg.indexOf("="));
  +                    String propValue = arg.substring(arg.indexOf("=") + 1);
  +                    _props.setProperty(propName, propValue);
                   } else if (arg.startsWith("propfile:")) { 
                       try {
                           _props.load(new FileInputStream(arg.substring(9)));
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message