Browse Source

sanity check filter tokens.

PR: 4634


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269908 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
eb2f2bbe44
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/main/org/apache/tools/ant/types/FilterSet.java

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

@@ -245,6 +245,9 @@ public class FilterSet extends DataType {
if (isReference()) { if (isReference()) {
throw tooManyAttributes(); throw tooManyAttributes();
} }
if (startOfToken == null || "".equals(startOfToken)) {
throw new BuildException("beginToken must not be empty");
}
this.startOfToken = startOfToken; this.startOfToken = startOfToken;
} }


@@ -265,6 +268,9 @@ public class FilterSet extends DataType {
if (isReference()) { if (isReference()) {
throw tooManyAttributes(); throw tooManyAttributes();
} }
if (endOfToken == null || "".equals(endOfToken)) {
throw new BuildException("endToken must not be empty");
}
this.endOfToken = endOfToken; this.endOfToken = endOfToken;
} }




Loading…
Cancel
Save