kaz         2002/06/07 09:46:21

  Modified:    src/java/org/apache/maven/tasklist TaskListExecutor.java
  Log:
  If there are no task list entries, then don't create a task list report.
  
  Revision  Changes    Path
  1.3       +13 -4     
jakarta-turbine-maven/src/java/org/apache/maven/tasklist/TaskListExecutor.java
  
  Index: TaskListExecutor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/tasklist/TaskListExecutor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TaskListExecutor.java     6 Jun 2002 16:54:28 -0000       1.2
  +++ TaskListExecutor.java     7 Jun 2002 16:46:21 -0000       1.3
  @@ -74,7 +74,7 @@
    * task list is generated as an XML file.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Pete Kazmier</a>
  - * @version $Id: TaskListExecutor.java,v 1.2 2002/06/06 16:54:28 dion Exp $
  + * @version $Id: TaskListExecutor.java,v 1.3 2002/06/07 16:46:21 kaz Exp $
    */
   public class TaskListExecutor extends FileProcessingExecutor
   {
  @@ -164,12 +164,21 @@
       }
   
       /**
  -     * Prints the results of the executor to a file as XML.  This
  -     * method is invoked once (not once per file) after processing
  -     * is completed.
  +     * Prints the results of the executor to a file as XML if a task
  +     * list contains entries.  This method is invoked once (not once per
  +     * file) after processing is completed.
        */
       protected void doPostProcessing()
       {
  +        /*
  +         * No need to generate a task list if there aren't any entries
  +         * in the list!
  +         */
  +        if (taskList.getTaskListEntries().size() == 0)
  +        {
  +            return;
  +        }
  +
           try
           {
               PrintWriter out = new PrintWriter(new OutputStreamWriter(
  
  
  

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

Reply via email to