ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r1452123 - in /ant/core/trunk/src/main/org/apache/tools/ant: filters/ filters/util/ taskdefs/condition/ taskdefs/optional/image/ types/selectors/
Date Sun, 03 Mar 2013 21:18:31 GMT
Author: antoine
Date: Sun Mar  3 21:18:31 2013
New Revision: 1452123

URL: http://svn.apache.org/r1452123
Log:
checkstyle

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java
    ant/core/trunk/src/main/org/apache/tools/ant/filters/util/ChainReaderHelper.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/IsLastModified.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/TokenizedPattern.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java?rev=1452123&r1=1452122&r2=1452123&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java Sun Mar  3 21:18:31
2013
@@ -262,8 +262,7 @@ public final class FixCrLfFilter extends
         // Change all EOL characters to match the calculated EOL string. If
         // configured to do so, append a trailing EOL so that the file ends on
         // a EOL.
-        if (eol != CrLf.ASIS)
-        {
+        if (eol != CrLf.ASIS) {
             in = new NormalizeEolFilter(in, calculateEolString(eol), getFixlast());
         }
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/filters/util/ChainReaderHelper.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/filters/util/ChainReaderHelper.java?rev=1452123&r1=1452122&r2=1452123&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/filters/util/ChainReaderHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/filters/util/ChainReaderHelper.java Sun Mar
 3 21:18:31 2013
@@ -198,7 +198,7 @@ public final class ChainReaderHelper {
      * Deregisters Classloaders from the project so GC can remove them later.
      */
     private static void cleanUpClassLoaders(List<AntClassLoader> loaders) {
-        for (Iterator<AntClassLoader> it = loaders.iterator(); it.hasNext(); ) {
+        for (Iterator<AntClassLoader> it = loaders.iterator(); it.hasNext();) {
             it.next().cleanup();
         }
     }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/IsLastModified.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/IsLastModified.java?rev=1452123&r1=1452122&r2=1452123&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/IsLastModified.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/IsLastModified.java Sun
Mar  3 21:18:31 2013
@@ -80,6 +80,7 @@ public class IsLastModified extends Proj
 
     /**
      * The resource to test.
+     * @param r the resource to test
      */
     public void add(Resource r) {
         if (resource != null) {
@@ -90,6 +91,7 @@ public class IsLastModified extends Proj
 
     /**
      * The type of comparison to test.
+     * @param mode the mode of comparison.
      */
     public void setMode(CompareMode mode) {
         this.mode = mode;
@@ -97,6 +99,8 @@ public class IsLastModified extends Proj
 
     /**
      * Argument validation.
+     * @throws BuildException if the required attributes are not supplied or
+     * if there is an inconsistency in the attributes.
      */
     protected void validate() throws BuildException {
         if (millis >= 0 && dateTime != null) {
@@ -114,6 +118,8 @@ public class IsLastModified extends Proj
     /**
      * Calculate timestamp as millis either based on millis or
      * dateTime (and pattern) attribute.
+     * @return time in milliseconds
+     * @throws BuildException if the date cannot be parsed.
      */
     protected long getMillis() throws BuildException {
         if (millis >= 0) {
@@ -145,6 +151,11 @@ public class IsLastModified extends Proj
         return 0;
     }
 
+    /**
+     * evaluate the condition
+     * @return true or false depending on the compoarison mode and the time of the resource
+     * @throws BuildException
+     */
     public boolean eval() throws BuildException {
         validate();
         long expected = getMillis();
@@ -170,6 +181,9 @@ public class IsLastModified extends Proj
         throw new BuildException("Unknown mode " + mode.getValue());
     }
 
+    /**
+     * describes comparison modes.
+     */
     public static class CompareMode extends EnumeratedAttribute {
         private static final String EQUALS_TEXT = "equals";
         private static final String BEFORE_TEXT = "before";
@@ -179,10 +193,17 @@ public class IsLastModified extends Proj
 
         private static final CompareMode EQUALS = new CompareMode(EQUALS_TEXT);
 
+        /**
+         * creates a CompareMode instance of type equals
+         */
         public CompareMode() {
             this(EQUALS_TEXT);
         }
 
+        /**
+         * creates a comparemode instance
+         * @param s one of the authorized values for comparemode
+         */
         public CompareMode(String s) {
             super();
             setValue(s);

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java?rev=1452123&r1=1452122&r2=1452123&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java Sun Mar
 3 21:18:31 2013
@@ -213,7 +213,7 @@ public class Image extends MatchingTask 
      * the directory.
      * @since Ant 1.8.0
      */
-    public int processDir(final File srcDir, final String srcNames[],
+    public int processDir(final File srcDir, final String[] srcNames,
                           final File dstDir, final FileNameMapper mapper) {
         int writeCount = 0;
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java?rev=1452123&r1=1452122&r2=1452123&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java Sun Mar
 3 21:18:31 2013
@@ -47,7 +47,7 @@ public class TokenizedPath {
     private static final boolean[] CS_THEN_NON_CS = new boolean[] {true, false};
 
     private final String path;
-    private final String tokenizedPath[];
+    private final String[] tokenizedPath;
 
     /**
     * Initialize the TokenizedPath by parsing it. 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/TokenizedPattern.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/TokenizedPattern.java?rev=1452123&r1=1452122&r2=1452123&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/TokenizedPattern.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/TokenizedPattern.java Sun
Mar  3 21:18:31 2013
@@ -38,7 +38,7 @@ public class TokenizedPattern {
         new TokenizedPattern("", new String[0]);
 
     private final String pattern;
-    private final String tokenizedPattern[];
+    private final String[] tokenizedPattern;
 
     /**
     * Initialize the PathPattern by parsing it.



Mime
View raw message