From eb2f2bbe448b8d4b8c89dd319543863a2c7bd5a4 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 13 Nov 2001 14:58:01 +0000 Subject: [PATCH] sanity check filter tokens. PR: 4634 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269908 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/types/FilterSet.java | 6 ++++++ 1 file changed, 6 insertions(+) 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; }