ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r475987 - in /ant/core/trunk/src/main/org/apache/tools/ant: filters/util/JavaClassHelper.java taskdefs/Ant.java taskdefs/CallTarget.java taskdefs/FixCRLF.java taskdefs/Zip.java
Date Thu, 16 Nov 2006 23:41:11 GMT
Author: peterreilly
Date: Thu Nov 16 15:41:10 2006
New Revision: 475987

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

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Ant.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/CallTarget.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java?view=diff&rev=475987&r1=475986&r2=475987
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java Thu Nov
16 15:41:10 2006
@@ -24,12 +24,12 @@
 import org.apache.bcel.classfile.Field;
 import org.apache.bcel.classfile.JavaClass;
 
+// CheckStyle:HideUtilityClassConstructorCheck OFF - bc
 /**
  * Helper class that filters constants from a Java Class
  *
  */
 public final class JavaClassHelper {
-
     /** System specific line separator. */
     private static final String LS = System.getProperty("line.separator");
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Ant.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Ant.java?view=diff&rev=475987&r1=475986&r2=475987
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Ant.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Ant.java Thu Nov 16 15:41:10 2006
@@ -215,6 +215,10 @@
     }
 
     /**
+     * Handles output.
+     * Send it the the new project if is present, otherwise
+     * call the super class.
+     * @param outputToHandle The string output to output.
      * @see Task#handleOutput(String)
      * @since Ant 1.5
      */
@@ -227,6 +231,16 @@
     }
 
     /**
+     * Handles input.
+     * Deleate to the created project, if present, otherwise
+     * call the super class.
+     * @param buffer the buffer into which data is to be read.
+     * @param offset the offset into the buffer at which data is stored.
+     * @param length the amount of data to read.
+     *
+     * @return the number of bytes read.
+     *
+     * @exception IOException if the data cannot be read.
      * @see Task#handleInput(byte[], int, int)
      * @since Ant 1.6
      */
@@ -239,6 +253,10 @@
     }
 
     /**
+     * Handles output.
+     * Send it the the new project if is present, otherwise
+     * call the super class.
+     * @param toFlush The string to output.
      * @see Task#handleFlush(String)
      * @since Ant 1.5.2
      */
@@ -251,6 +269,11 @@
     }
 
     /**
+     * Handle error output.
+     * Send it the the new project if is present, otherwise
+     * call the super class.
+     * @param errorOutputToHandle The string to output.
+     *
      * @see Task#handleErrorOutput(String)
      * @since Ant 1.5
      */
@@ -263,6 +286,10 @@
     }
 
     /**
+     * Handle error output.
+     * Send it the the new project if is present, otherwise
+     * call the super class.
+     * @param errorOutputToFlush The string to output.
      * @see Task#handleErrorFlush(String)
      * @since Ant 1.5.2
      */

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/CallTarget.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/CallTarget.java?view=diff&rev=475987&r1=475986&r2=475987
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/CallTarget.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/CallTarget.java Thu Nov 16 15:41:10
2006
@@ -167,8 +167,11 @@
     }
 
     /**
+     * Handles output.
+     * Send it the the new project if is present, otherwise
+     * call the super class.
+     * @param output The string output to output.
      * @see Task#handleOutput(String)
-     *
      * @since Ant 1.5
      */
     public void handleOutput(String output) {
@@ -180,8 +183,17 @@
     }
 
     /**
-     * @see Task#handleInput(byte[], int, int)
+     * Handles input.
+     * Deleate to the created project, if present, otherwise
+     * call the super class.
+     * @param buffer the buffer into which data is to be read.
+     * @param offset the offset into the buffer at which data is stored.
+     * @param length the amount of data to read.
      *
+     * @return the number of bytes read.
+     *
+     * @exception IOException if the data cannot be read.
+     * @see Task#handleInput(byte[], int, int)
      * @since Ant 1.6
      */
     public int handleInput(byte[] buffer, int offset, int length)
@@ -193,8 +205,11 @@
     }
 
     /**
+     * Handles output.
+     * Send it the the new project if is present, otherwise
+     * call the super class.
+     * @param output The string to output.
      * @see Task#handleFlush(String)
-     *
      * @since Ant 1.5.2
      */
     public void handleFlush(String output) {
@@ -206,8 +221,12 @@
     }
 
     /**
-     * @see Task#handleErrorOutput(String)
+     * Handle error output.
+     * Send it the the new project if is present, otherwise
+     * call the super class.
+     * @param output The string to output.
      *
+     * @see Task#handleErrorOutput(String)
      * @since Ant 1.5
      */
     public void handleErrorOutput(String output) {
@@ -219,8 +238,11 @@
     }
 
     /**
+     * Handle error output.
+     * Send it the the new project if is present, otherwise
+     * call the super class.
+     * @param output The string to output.
      * @see Task#handleErrorFlush(String)
-     *
      * @since Ant 1.5.2
      */
     public void handleErrorFlush(String output) {

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java?view=diff&rev=475987&r1=475986&r2=475987
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java Thu Nov 16 15:41:10
2006
@@ -83,6 +83,7 @@
 
 public class FixCRLF extends MatchingTask implements ChainableReader {
 
+    /** error string for using srcdir and file */
     public static final String ERROR_FILE_AND_SRCDIR
         = "srcdir and file are mutually exclusive";
 
@@ -371,6 +372,10 @@
         }
     }
 
+    /**
+     * Deprecated, the functionality has been moved to filters.FixCrLfFilter.
+     * @deprecated since 1.7.0.
+     */
     protected class OneLiner implements Enumeration {
         private static final int UNDEF = -1;
         private static final int NOTJAVA = 0;
@@ -389,6 +394,11 @@
         private boolean reachedEof = false;
         private File srcFile;
 
+        /**
+         * Constructor.
+         * @param srcFile the file to read.
+         * @throws BuildException if there is an error.
+         */
         public OneLiner(File srcFile)
             throws BuildException {
             this.srcFile = srcFile;
@@ -405,6 +415,10 @@
             }
         }
 
+        /**
+         * Move to the next line.
+         * @throws BuildException if there is an error.
+         */
         protected void nextLine()
             throws BuildException {
             int ch = -1;
@@ -433,9 +447,11 @@
                     ++eolcount;
                     eolStr.append('\r');
                     reader.mark(2);
-                    switch ((ch = reader.read())) {
+                    ch = reader.read();
+                    switch (ch) {
                     case '\r':
-                        if ((char) (ch = reader.read()) == '\n') {
+                        ch = reader.read();
+                        if ((char) (ch) == '\n') {
                             eolcount += 2;
                             eolStr.append("\r\n");
                         } else {
@@ -460,7 +476,8 @@
                     ++eolcount;
                     eolStr.append('\n');
                     break;
-
+                default:
+                    // Fall tru
                 } // end of switch ((char) ch)
 
                 // if at eolcount == 0 and trailing characters of string
@@ -490,22 +507,42 @@
             }
         }
 
+        /**
+         * get the eof string.
+         * @return the eof string.
+         */
         public String getEofStr() {
             return eofStr.substring(0);
         }
 
+        /**
+         * get the state.
+         * @return the state.
+         */
         public int getState() {
             return state;
         }
 
+        /**
+         * Set the state.
+         * @param state the value to use.
+         */
         public void setState(int state) {
             this.state = state;
         }
 
+        /**
+         * @return true if there is more elements.
+         */
         public boolean hasMoreElements() {
             return !reachedEof;
         }
 
+        /**
+         * get the next element.
+         * @return the next element.
+         * @throws NoSuchElementException if there is no more.
+         */
         public Object nextElement()
             throws NoSuchElementException {
             if (!hasMoreElements()) {
@@ -517,6 +554,10 @@
             return tmpLine;
         }
 
+        /**
+         * Close the reader.
+         * @throws IOException if there is an error.
+         */
         public void close() throws IOException {
             if (reader != null) {
                 reader.close();

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java?view=diff&rev=475987&r1=475986&r2=475987
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java Thu Nov 16 15:41:10 2006
@@ -66,6 +66,7 @@
  * @ant.task category="packaging"
  */
 public class Zip extends MatchingTask {
+    // CheckStyle:VisibilityModifier OFF - bc
 
     protected File zipFile;
     // use to scan own archive
@@ -93,6 +94,8 @@
     protected boolean skipWriting = false;
 
     private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
+
+    // CheckStyle:VisibilityModifier ON
 
     /**
      * true when we are adding new files into the Zip file, as opposed



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


Mime
View raw message