Browse Source

checkstyle

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@473114 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
a6581ca523
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      src/main/org/apache/tools/ant/types/FilterSet.java

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

@@ -41,11 +41,13 @@ public class FilterSet extends DataType implements Cloneable {
* *
*/ */
public static class Filter { public static class Filter {
// CheckStyle:VisibilityModifier OFF - bc
/** Token which will be replaced in the filter operation. */ /** Token which will be replaced in the filter operation. */
String token; String token;


/** The value which will replace the token in the filtering operation. */ /** The value which will replace the token in the filtering operation. */
String value; String value;
// CheckStyle:VisibilityModifier ON


/** /**
* Constructor for the Filter object. * Constructor for the Filter object.
@@ -132,8 +134,11 @@ public class FilterSet extends DataType implements Cloneable {
private static final String[] VALUES private static final String[] VALUES
= new String[] {"fail", "warn", "ignore"}; = new String[] {"fail", "warn", "ignore"};


/** Fail value */
public static final OnMissing FAIL = new OnMissing("fail"); public static final OnMissing FAIL = new OnMissing("fail");
/** Warn value */
public static final OnMissing WARN = new OnMissing("warn"); public static final OnMissing WARN = new OnMissing("warn");
/** Ignore value */
public static final OnMissing IGNORE = new OnMissing("ignore"); public static final OnMissing IGNORE = new OnMissing("ignore");


private static final int FAIL_INDEX = 0; private static final int FAIL_INDEX = 0;
@@ -155,6 +160,7 @@ public class FilterSet extends DataType implements Cloneable {
} }


//inherit doc //inherit doc
/** {@inheritDoc}. */
public String[] getValues() { public String[] getValues() {
return VALUES; return VALUES;
} }
@@ -254,6 +260,7 @@ public class FilterSet extends DataType implements Cloneable {
* *
* @param filtersFile sets the filter file from which to read filters * @param filtersFile sets the filter file from which to read filters
* for this filter set. * for this filter set.
* @throws BuildException if there is an error.
*/ */
public void setFiltersfile(File filtersFile) throws BuildException { public void setFiltersfile(File filtersFile) throws BuildException {
if (isReference()) { if (isReference()) {
@@ -599,6 +606,9 @@ public class FilterSet extends DataType implements Cloneable {
throw new BuildException(message); throw new BuildException(message);
case OnMissing.WARN_INDEX: case OnMissing.WARN_INDEX:
log(message, Project.MSG_WARN); log(message, Project.MSG_WARN);
return;
default:
throw new BuildException("Invalid value for onMissingFiltersFile");
} }
} }




Loading…
Cancel
Save