User: vharcq  
  Date: 02/06/12 00:46:35

  Modified:    src/xjavadoc/ant XJavadocTask.java
  Log:
  Bug 548610 : remove 'sourcepath' possible usage from xjavadoc and report a message 
to use 'fileset' instead
  
  Revision  Changes    Path
  1.19      +20 -36    xjavadoc/src/xjavadoc/ant/XJavadocTask.java
  
  Index: XJavadocTask.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/ant/XJavadocTask.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -w -r1.18 -r1.19
  --- XJavadocTask.java 28 May 2002 18:11:18 -0000      1.18
  +++ XJavadocTask.java 12 Jun 2002 07:46:35 -0000      1.19
  @@ -4,23 +4,15 @@
    */
   package xjavadoc.ant;
   
  -import java.io.BufferedOutputStream;
  -import java.io.FileOutputStream;
  -import java.io.ObjectOutputStream;
  -import java.io.OutputStream;
  -import java.io.IOException;
  -import java.io.File;
  -
  -import java.util.ArrayList;
  -import java.util.Iterator;
  -import org.apache.tools.ant.DynamicConfigurator;
  +import org.apache.tools.ant.Task;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.DirectoryScanner;
  -import org.apache.tools.ant.Task;
  -//import org.apache.tools.ant.taskdefs.Java;
  -import org.apache.tools.ant.types.Reference;
  -import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.types.FileSet;
  +
  +import java.util.ArrayList;
  +import java.io.File;
  +
   import xjavadoc.XJavaDoc;
   import xjavadoc.SourceSet;
   
  @@ -33,27 +25,22 @@
    */
   public abstract class XJavadocTask extends Task
   {
  -     /**
  -      * @todo-javadoc   Describe the field
  -      */
  +
        private final ArrayList _fileSets = new ArrayList();
   
  +     /**
  +      * @param path
  +      * @deprecated   This method will disappear soon
  +      */
        public void setSourcepath( Path path )
        {
  -             String dir = path.toString();
  -             FileSet fileSet = new FileSet();
  -
  -             fileSet.setDir( new File( dir ) );
  -             fileSet.setIncludes( "**/*.java" );
  -             addFileset( fileSet );
  +             throw new BuildException( "The 'sourcepath' attribute can not be used 
anymore.  Use <fileset> to define the files to parse" );
        }
   
        /**
  -      * Describe what the method does
  +      * Implementation of Ant's Task.execute().
         *
  -      * @exception BuildException  Describe the exception
  -      * @todo-javadoc              Write javadocs for method
  -      * @todo-javadoc              Write javadocs for exception
  +      * @exception BuildException  Ant's way or reporting build exception
         */
        public final void execute() throws BuildException
        {
  @@ -99,11 +86,9 @@
        }
   
        /**
  -      * Describe the method
  +      * Ant's &lt;fileset&gt; definition. To define the files to parse.
         *
  -      * @param set      Describe the method parameter
  -      * @todo-javadoc   Describe the method
  -      * @todo-javadoc   Describe the method parameter
  +      * @param set  a fileset to add
         */
        public void addFileset( FileSet set )
        {
  @@ -113,16 +98,14 @@
        /**
         * Implement this method and play with XJavaDoc.getInstance()
         *
  -      * @exception BuildException
  +      * @exception BuildException  Ant's way of reporting exception
         */
        protected abstract void start() throws BuildException;
   
        /**
  -      * Describe what the method does
  +      * Validate a Xdoclet task before running it.
         *
  -      * @exception BuildException  Describe the exception
  -      * @todo-javadoc              Write javadocs for method
  -      * @todo-javadoc              Write javadocs for exception
  +      * @exception BuildException  in case the validation fails.
         */
        protected void validateOptions() throws BuildException
        {
  @@ -131,5 +114,6 @@
                        throw new BuildException( "At least one fileset must be 
specified", location );
                }
        }
  +
   }
   
  
  
  

_______________________________________________________________

Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to