ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r565093 - in /ant/core/trunk/src/main/org/apache/tools/ant: types/ types/resources/ types/selectors/ util/
Date Sun, 12 Aug 2007 18:11:42 GMT
Author: peterreilly
Date: Sun Aug 12 11:11:41 2007
New Revision: 565093

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

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/types/FilterSet.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/PatternSet.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/Permissions.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/ZipScanner.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Last.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
    ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java
    ant/core/trunk/src/main/org/apache/tools/ant/util/DeweyDecimal.java
    ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/FilterSet.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/FilterSet.java?view=diff&rev=565093&r1=565092&r2=565093
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/FilterSet.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/FilterSet.java Sun Aug 12 11:11:41
2007
@@ -370,7 +370,7 @@
               }
            } catch (Exception ex) {
               throw new BuildException("Could not read filters from file: "
-                  + filtersFile,ex);
+                  + filtersFile, ex);
            } finally {
               FileUtils.close(in);
            }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/PatternSet.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/PatternSet.java?view=diff&rev=565093&r1=565092&r2=565093
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/PatternSet.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/PatternSet.java Sun Aug 12 11:11:41
2007
@@ -143,7 +143,7 @@
         }
     }
 
-    private static class InvertedPatternSet extends PatternSet {
+    private static final class InvertedPatternSet extends PatternSet {
         private InvertedPatternSet(PatternSet p) {
             setProject(p.getProject());
             addConfiguredPatternset(p);
@@ -503,7 +503,7 @@
 
     /**
      * Add an inverted patternset.
-     *
+     * @param p the pattern to invert and add.
      */
     public void addConfiguredInvert(PatternSet p) {
         addConfiguredPatternset(new InvertedPatternSet(p));

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/Permissions.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/Permissions.java?view=diff&rev=565093&r1=565092&r2=565093
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/Permissions.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/Permissions.java Sun Aug 12 11:11:41
2007
@@ -53,7 +53,7 @@
     private boolean delegateToOldSM;
 
     // Mandatory constructor for permission object.
-    private static final Class[] PARAMS = { String.class, String.class };
+    private static final Class[] PARAMS = {String.class, String.class};
 
     /**
      * Create a set of Permissions.  Equivalent to calling

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/ZipScanner.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/ZipScanner.java?view=diff&rev=565093&r1=565092&r2=565093
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/ZipScanner.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/ZipScanner.java Sun Aug 12 11:11:41
2007
@@ -27,7 +27,6 @@
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.types.resources.FileResource;
 import org.apache.tools.ant.types.resources.ZipResource;
-import org.apache.tools.ant.util.FileUtils;
 import org.apache.tools.zip.ZipEntry;
 import org.apache.tools.zip.ZipFile;
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Last.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Last.java?view=diff&rev=565093&r1=565092&r2=565093
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Last.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Last.java Sun Aug 12 11:11:41
2007
@@ -42,7 +42,9 @@
         int i = count;
         Iterator iter = rc.iterator();
         int size = rc.size();
-        for (; i < size; i++) iter.next();
+        for (; i < size; i++) {
+            iter.next();
+        }
 
         ArrayList al = new ArrayList(count);
         for (; iter.hasNext(); i++) {

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java?view=diff&rev=565093&r1=565092&r2=565093
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java Sun Aug
12 11:11:41 2007
@@ -124,6 +124,9 @@
             strIdxStart++;
         }
 
+        // CheckStyle:SimplifyBooleanReturnCheck OFF
+        // Check turned off as the code needs the comments for the various
+        // code paths.
         if (strIdxStart > strIdxEnd) {
             // String is exhausted
             return true;

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java?view=diff&rev=565093&r1=565092&r2=565093
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java Sun Aug 12 11:11:41
2007
@@ -102,7 +102,8 @@
      * classloader behaviour)
      * @return The class loader
      */
-    public static ClassLoader getClassLoaderForPath(Project p, Reference ref, boolean reverseLoader)
{
+    public static ClassLoader getClassLoaderForPath(
+        Project p, Reference ref, boolean reverseLoader) {
         String pathId = ref.getRefId();
         Object path = p.getReference(pathId);
         if (!(path instanceof Path)) {
@@ -423,8 +424,11 @@
          * @return a loader identifier.
          */
         public String getClassLoadId() {
-            return loaderId == null && classpathId != null ? MagicNames.REFID_CLASSPATH_LOADER_PREFIX
-                    + classpathId : loaderId;
+            if (loaderId == null && classpathId != null) {
+                return MagicNames.REFID_CLASSPATH_LOADER_PREFIX + classpathId;
+            } else {
+                return loaderId;
+            }
         }
 
         /**

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/DeweyDecimal.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/DeweyDecimal.java?view=diff&rev=565093&r1=565092&r2=565093
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/DeweyDecimal.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/DeweyDecimal.java Sun Aug 12 11:11:41
2007
@@ -18,7 +18,6 @@
 package org.apache.tools.ant.util;
 
 import java.util.StringTokenizer;
-import java.util.Arrays;
 
 /**
  * Utility class to contain version numbers in "Dewey Decimal"

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java?view=diff&rev=565093&r1=565092&r2=565093
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java Sun Aug 12 11:11:41
2007
@@ -59,7 +59,7 @@
         if (text != null) {
             runner.addText(text);
         }
-        if (resources !=null) {
+        if (resources != null) {
             runner.loadResources(resources);
         }
         if (setBeans) {



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


Mime
View raw message