Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 1969 invoked from network); 9 Nov 2001 13:20:39 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 9 Nov 2001 13:20:39 -0000 Received: (qmail 7960 invoked by uid 97); 9 Nov 2001 13:20:21 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 7943 invoked by uid 97); 9 Nov 2001 13:20:21 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 7929 invoked by uid 97); 9 Nov 2001 13:20:20 -0000 Date: 9 Nov 2001 13:08:15 -0000 Message-ID: <20011109130815.62813.qmail@icarus.apache.org> From: bodewig@apache.org To: jakarta-ant-cvs@apache.org Subject: cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/util/regexp MatcherWrappedAsRegexpTest.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N bodewig 01/11/09 05:08:15 Modified: src/main/org/apache/tools/ant/util/regexp RegexpFactory.java Removed: src/main/org/apache/tools/ant/util/regexp MatcherWrappedAsRegexp.java src/testcases/org/apache/tools/ant/util/regexp MatcherWrappedAsRegexpTest.java Log: don't try to do too much with the regexp stuff. Revision Changes Path 1.3 +12 -2 jakarta-ant/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java Index: RegexpFactory.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- RegexpFactory.java 2001/10/26 09:36:40 1.2 +++ RegexpFactory.java 2001/11/09 13:08:15 1.3 @@ -62,6 +62,7 @@ * ant.regexp.regexpimpl. * * @author Matthew Inger mattinger@mindless.com + * @version $Revision: 1.3 $ */ public class RegexpFactory extends RegexpMatcherFactory { @@ -110,12 +111,21 @@ throw new BuildException("No supported regular expression matcher found"); } - protected Regexp createRegexpInstance(String classname) { + /** + * Wrapper over {@seee RegexpMatcherFactory#createInstance + * createInstance} that ensures that we are dealing with a Regexp + * implementation. + * + * @since 1.3 + */ + protected Regexp createRegexpInstance(String classname) + throws BuildException { + RegexpMatcher m = createInstance(classname); if (m instanceof Regexp) { return (Regexp) m; } else { - return new MatcherWrappedAsRegexp(m); + throw new BuildException(classname + " doesn't implement the Regexp interface"); } } -- To unsubscribe, e-mail: For additional commands, e-mail: