diff --git a/src/main/org/apache/tools/ant/types/FilterSet.java b/src/main/org/apache/tools/ant/types/FilterSet.java index 7269954a0..f69bf8bd8 100644 --- a/src/main/org/apache/tools/ant/types/FilterSet.java +++ b/src/main/org/apache/tools/ant/types/FilterSet.java @@ -245,6 +245,9 @@ public class FilterSet extends DataType { if (isReference()) { throw tooManyAttributes(); } + if (startOfToken == null || "".equals(startOfToken)) { + throw new BuildException("beginToken must not be empty"); + } this.startOfToken = startOfToken; } @@ -265,6 +268,9 @@ public class FilterSet extends DataType { if (isReference()) { throw tooManyAttributes(); } + if (endOfToken == null || "".equals(endOfToken)) { + throw new BuildException("endToken must not be empty"); + } this.endOfToken = endOfToken; }