ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r471288 - in /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs: Javadoc.java LogOutputStream.java MacroDef.java MakeUrl.java MatchingTask.java Move.java PathConvert.java Property.java compilers/AptCompilerAdapter.java
Date Sat, 04 Nov 2006 22:45:08 GMT
Author: peterreilly
Date: Sat Nov  4 14:45:07 2006
New Revision: 471288

URL: http://svn.apache.org/viewvc?view=rev&rev=471288
Log:
checkstyle

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroDef.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MakeUrl.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Move.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Property.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/AptCompilerAdapter.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java?view=diff&rev=471288&r1=471287&r2=471288
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java Sat Nov  4 14:45:07
2006
@@ -257,7 +257,8 @@
         }
 
         /**
-         * @see java.lang.Object#toString
+         * Return a string rep for this object.
+         * @return the package name.
          */
         public String toString() {
             return getName();
@@ -341,7 +342,7 @@
      */
     public static class AccessType extends EnumeratedAttribute {
         /**
-         * @see EnumeratedAttribute#getValues().
+         * @return the allowed values for the access type.
          */
         public String[] getValues() {
             // Protected first so if any GUI tool offers a default
@@ -359,9 +360,18 @@
      */
     public class ResourceCollectionContainer {
         private ArrayList rcs = new ArrayList();
+        /**
+         * Add a resource collection to the container.
+         * @param rc the collection to add.
+         */
         public void add(ResourceCollection rc) {
             rcs.add(rc);
         }
+
+        /**
+         * Get an iterator on the collection.
+         * @return an iterator.
+         */
         private Iterator iterator() {
             return rcs.iterator();
         }
@@ -1227,6 +1237,7 @@
         /**
          * should Ant resolve the link attribute relative to the
          * current basedir?
+         * @return the resolveLink attribute.
          */
         public boolean shouldResolveLink() {
             return resolveLink;
@@ -1507,10 +1518,11 @@
     public void setSource(String source) {
         this.source = source;
     }
-    
+
     /**
      * Sets the actual executable command to invoke, instead of the binary
      * <code>javadoc</code> found in Ant's JDK.
+     * @param executable the command to invoke.
      * @since Ant 1.6.3
      */
     public void setExecutable(String executable) {
@@ -1547,6 +1559,7 @@
      * Adds a container for resource collections.
      *
      * <p>All included files will be added as sourcefiles.</p>
+     * @return the source files to configure.
      * @since 1.7
      */
     public ResourceCollectionContainer createSourceFiles() {
@@ -1586,6 +1599,7 @@
     /**
      * If set to true, Ant will also accept packages that only hold
      * package.html files but no Java sources.
+     * @param b a <code>boolean</code> value.
      * @since Ant 1.6.3
      */
     public void setIncludeNoSourcePackages(boolean b) {
@@ -1598,15 +1612,16 @@
      */
     public void execute() throws BuildException {
         if ("javadoc2".equals(getTaskType())) {
-            log("Warning: the task name <javadoc2> is deprecated. Use <javadoc>
instead.", Project.MSG_WARN);
+            log("Warning: the task name <javadoc2> is deprecated. Use <javadoc>
instead.",
+                Project.MSG_WARN);
         }
 
         // Whether *this VM* is 1.4+ (but also check executable != null).
         boolean javadoc4 =
-            !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_2) &&
-            !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_3);
-        boolean javadoc5 = javadoc4 &&
-            !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_4);
+            !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_2)
+            && !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_3);
+        boolean javadoc5 = javadoc4
+            && !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_4);
 
         Vector packagesToDoc = new Vector();
         Path sourceDirs = new Path(getProject());
@@ -1746,7 +1761,7 @@
                 }
                 String link = null;
                 if (la.shouldResolveLink()) {
-                    File hrefAsFile = 
+                    File hrefAsFile =
                         getProject().resolveFile(la.getHref());
                     if (hrefAsFile.exists()) {
                         try {
@@ -1754,7 +1769,7 @@
                                 .toExternalForm();
                         } catch (MalformedURLException ex) {
                             // should be impossible
-                            log("Warning: link location was invalid " 
+                            log("Warning: link location was invalid "
                                 + hrefAsFile, Project.MSG_WARN);
                         }
                     }
@@ -1778,7 +1793,7 @@
                     File packageListLocation = la.getPackagelistLoc();
                     if (packageListLocation == null) {
                         throw new BuildException("The package list"
-                                                 + " location for link " 
+                                                 + " location for link "
                                                  + la.getHref()
                                                  + " must be provided "
                                                  + "because the link is "
@@ -1874,7 +1889,7 @@
                         // The tag element is used as a
                         // fileset. Parse all the files and create
                         // -tag arguments.
-                        DirectoryScanner tagDefScanner = 
+                        DirectoryScanner tagDefScanner =
                             ta.getDirectoryScanner(getProject());
                         String[] files = tagDefScanner.getIncludedFiles();
                         for (int i = 0; i < files.length; i++) {
@@ -1916,7 +1931,7 @@
                 }
             }
 
-            String sourceArg = source != null ? source 
+            String sourceArg = source != null ? source
                 : getProject().getProperty(MagicNames.BUILD_JAVAC_SOURCE);
             if (sourceArg != null) {
                 toExecute.createArgument().setValue("-source");
@@ -2008,7 +2023,8 @@
                 SourceFile sf = (SourceFile) e.nextElement();
                 String sourceFileName = sf.getFile().getAbsolutePath();
                 if (useExternalFile) {
-                    // XXX what is the following doing? should it run if !javadoc4 &&
executable != null?
+                    // XXX what is the following doing?
+                    //     should it run if !javadoc4 && executable != null?
                     if (javadoc4 && sourceFileName.indexOf(" ") > -1) {
                         String name = sourceFileName;
                         if (File.separatorChar == '\\') {
@@ -2163,7 +2179,7 @@
         }
         return buf.toString();
     }
-    
+
     /**
      * Add the files matched by the nested source files to the Vector
      * as SourceFile instances.
@@ -2269,7 +2285,7 @@
                 String[] files = pd.list(new FilenameFilter () {
                         public boolean accept(File dir1, String name) {
                             return name.endsWith(".java")
-                                || (includeNoSourcePackages 
+                                || (includeNoSourcePackages
                                     && name.equals("package.html"));
                         }
                     });

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java?view=diff&rev=471288&r1=471287&r2=471288
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java Sat Nov  4
14:45:07 2006
@@ -90,6 +90,10 @@
         pc.log(line, level);
     }
 
+    /**
+     * Get the level.
+     * @return the log level.
+     */
     public int getMessageLevel() {
         return level;
     }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroDef.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroDef.java?view=diff&rev=471288&r1=471287&r2=471288
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroDef.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroDef.java Sat Nov  4 14:45:07
2006
@@ -763,9 +763,8 @@
         /** {@inheritDoc}. */
         protected boolean equals(Member m) {
             TemplateElement t = (TemplateElement) m;
-            return super.equals(m) &&
-                   optional == t.optional &&
-                   implicit == t.implicit;
+            return super.equals(m)
+                && optional == t.optional && implicit == t.implicit;
         }
 
         /**

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MakeUrl.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MakeUrl.java?view=diff&rev=471288&r1=471287&r2=471288
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MakeUrl.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MakeUrl.java Sat Nov  4 14:45:07
2006
@@ -73,17 +73,18 @@
      */
     private boolean validate = true;
 
-    /**
-     * error message
-     */
+    // error message strings
+    /** Missing file */
     public static final String ERROR_MISSING_FILE = "A source file is missing :";
+    /** No property defined */
     public static final String ERROR_NO_PROPERTY = "No property defined";
+    /** No files defined */
     public static final String ERROR_NO_FILES = "No files defined";
 
     /**
      * set the name of a property to fill with the URL
      *
-     * @param property
+     * @param property the name of the property.
      */
     public void setProperty(String property) {
         this.property = property;
@@ -92,7 +93,7 @@
     /**
      * the name of a file to be converted into a URL
      *
-     * @param file
+     * @param file the file to be converted.
      */
     public void setFile(File file) {
         this.file = file;
@@ -102,7 +103,7 @@
      * a fileset of jar files to include in the URL, each
      * separated by the separator
      *
-     * @param fileset
+     * @param fileset the fileset to be added.
      */
     public void addFileSet(FileSet fileset) {
         filesets.add(fileset);
@@ -111,7 +112,7 @@
     /**
      * set the separator for the multi-url option.
      *
-     * @param separator
+     * @param separator the separator to use.
      */
     public void setSeparator(String separator) {
         this.separator = separator;
@@ -121,7 +122,7 @@
      * set this flag to trigger validation that every named file exists.
      * Optional: default=true
      *
-     * @param validate
+     * @param validate a <code>boolean</code> value.
      */
     public void setValidate(boolean validate) {
         this.validate = validate;
@@ -131,7 +132,7 @@
      * add a path to the URL. All elements in the path
      * will be converted to individual URL entries
      *
-     * @param path
+     * @param path a path value.
      */
     public void addPath(Path path) {
         paths.add(path);

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java?view=diff&rev=471288&r1=471287&r2=471288
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java Sat Nov  4 14:45:07
2006
@@ -58,9 +58,7 @@
 
     protected FileSet fileset = new FileSet();
 
-    /**
-     * @see org.apache.tools.ant.ProjectComponent#setProject
-     */
+    /** {@inheritDoc}. */
     public void setProject(Project project) {
         super.setProject(project);
         fileset.setProject(project);

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Move.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Move.java?view=diff&rev=471288&r1=471287&r2=471288
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Move.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Move.java Sat Nov  4 14:45:07 2006
@@ -63,7 +63,7 @@
         setOverwrite(true);
     }
 
-    // inherit doc
+    /** {@inheritDoc}. */
     protected void validateAttributes() throws BuildException {
         if (file != null && file.isDirectory()) {
             if ((destFile != null && destDir != null)

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PathConvert.java?view=diff&rev=471288&r1=471287&r2=471288
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PathConvert.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PathConvert.java Sat Nov  4 14:45:07
2006
@@ -213,6 +213,7 @@
      * Set targetos to a platform to one of
      * "windows", "unix", "netware", or "os/2";
      * current platform settings are used by default.
+     * @param target the target os.
      * @deprecated since 1.5.x.
      *             Use the method taking a TargetOs argument instead.
      * @see #setTargetos(PathConvert.TargetOs)

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Property.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Property.java?view=diff&rev=471288&r1=471287&r2=471288
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Property.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Property.java Sat Nov  4 14:45:07
2006
@@ -334,7 +334,7 @@
     /**
      * @param userProperty ignored
      * @deprecated since 1.5.x.
-     *             This was never a supported feature and has been 
+     *             This was never a supported feature and has been
      *             deprecated without replacement.
      * @ant.attribute ignore="true"
      */

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/AptCompilerAdapter.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/AptCompilerAdapter.java?view=diff&rev=471288&r1=471287&r2=471288
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/AptCompilerAdapter.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/AptCompilerAdapter.java
Sat Nov  4 14:45:07 2006
@@ -156,7 +156,7 @@
 
     /**
      * Run the compilation.
-     * @retrun true on success.
+     * @return true on success.
      * @throws BuildException if the compilation has problems.
      */
     public boolean execute() throws BuildException {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message