Browse Source

checkstyle

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@565093 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
f3bbfa14c7
9 changed files with 18 additions and 11 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/types/FilterSet.java
  2. +2
    -2
      src/main/org/apache/tools/ant/types/PatternSet.java
  3. +1
    -1
      src/main/org/apache/tools/ant/types/Permissions.java
  4. +0
    -1
      src/main/org/apache/tools/ant/types/ZipScanner.java
  5. +3
    -1
      src/main/org/apache/tools/ant/types/resources/Last.java
  6. +3
    -0
      src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
  7. +7
    -3
      src/main/org/apache/tools/ant/util/ClasspathUtils.java
  8. +0
    -1
      src/main/org/apache/tools/ant/util/DeweyDecimal.java
  9. +1
    -1
      src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java

+ 1
- 1
src/main/org/apache/tools/ant/types/FilterSet.java View File

@@ -370,7 +370,7 @@ public class FilterSet extends DataType implements Cloneable {
} }
} catch (Exception ex) { } catch (Exception ex) {
throw new BuildException("Could not read filters from file: " throw new BuildException("Could not read filters from file: "
+ filtersFile,ex);
+ filtersFile, ex);
} finally { } finally {
FileUtils.close(in); FileUtils.close(in);
} }


+ 2
- 2
src/main/org/apache/tools/ant/types/PatternSet.java View File

@@ -143,7 +143,7 @@ public class PatternSet extends DataType implements Cloneable {
} }
} }


private static class InvertedPatternSet extends PatternSet {
private static final class InvertedPatternSet extends PatternSet {
private InvertedPatternSet(PatternSet p) { private InvertedPatternSet(PatternSet p) {
setProject(p.getProject()); setProject(p.getProject());
addConfiguredPatternset(p); addConfiguredPatternset(p);
@@ -503,7 +503,7 @@ public class PatternSet extends DataType implements Cloneable {


/** /**
* Add an inverted patternset. * Add an inverted patternset.
*
* @param p the pattern to invert and add.
*/ */
public void addConfiguredInvert(PatternSet p) { public void addConfiguredInvert(PatternSet p) {
addConfiguredPatternset(new InvertedPatternSet(p)); addConfiguredPatternset(new InvertedPatternSet(p));


+ 1
- 1
src/main/org/apache/tools/ant/types/Permissions.java View File

@@ -53,7 +53,7 @@ public class Permissions {
private boolean delegateToOldSM; private boolean delegateToOldSM;


// Mandatory constructor for permission object. // 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 * Create a set of Permissions. Equivalent to calling


+ 0
- 1
src/main/org/apache/tools/ant/types/ZipScanner.java View File

@@ -27,7 +27,6 @@ import java.util.zip.ZipException;
import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.types.resources.FileResource; import org.apache.tools.ant.types.resources.FileResource;
import org.apache.tools.ant.types.resources.ZipResource; 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.ZipEntry;
import org.apache.tools.zip.ZipFile; import org.apache.tools.zip.ZipFile;




+ 3
- 1
src/main/org/apache/tools/ant/types/resources/Last.java View File

@@ -42,7 +42,9 @@ public class Last extends SizeLimitCollection {
int i = count; int i = count;
Iterator iter = rc.iterator(); Iterator iter = rc.iterator();
int size = rc.size(); int size = rc.size();
for (; i < size; i++) iter.next();
for (; i < size; i++) {
iter.next();
}


ArrayList al = new ArrayList(count); ArrayList al = new ArrayList(count);
for (; iter.hasNext(); i++) { for (; iter.hasNext(); i++) {


+ 3
- 0
src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java View File

@@ -124,6 +124,9 @@ public final class SelectorUtils {
strIdxStart++; strIdxStart++;
} }


// CheckStyle:SimplifyBooleanReturnCheck OFF
// Check turned off as the code needs the comments for the various
// code paths.
if (strIdxStart > strIdxEnd) { if (strIdxStart > strIdxEnd) {
// String is exhausted // String is exhausted
return true; return true;


+ 7
- 3
src/main/org/apache/tools/ant/util/ClasspathUtils.java View File

@@ -102,7 +102,8 @@ public class ClasspathUtils {
* classloader behaviour) * classloader behaviour)
* @return The class loader * @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(); String pathId = ref.getRefId();
Object path = p.getReference(pathId); Object path = p.getReference(pathId);
if (!(path instanceof Path)) { if (!(path instanceof Path)) {
@@ -423,8 +424,11 @@ public class ClasspathUtils {
* @return a loader identifier. * @return a loader identifier.
*/ */
public String getClassLoadId() { 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;
}
} }


/** /**


+ 0
- 1
src/main/org/apache/tools/ant/util/DeweyDecimal.java View File

@@ -18,7 +18,6 @@
package org.apache.tools.ant.util; package org.apache.tools.ant.util;


import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.util.Arrays;


/** /**
* Utility class to contain version numbers in "Dewey Decimal" * Utility class to contain version numbers in "Dewey Decimal"


+ 1
- 1
src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java View File

@@ -59,7 +59,7 @@ public class ScriptRunnerHelper {
if (text != null) { if (text != null) {
runner.addText(text); runner.addText(text);
} }
if (resources !=null) {
if (resources != null) {
runner.loadResources(resources); runner.loadResources(resources);
} }
if (setBeans) { if (setBeans) {


Loading…
Cancel
Save