ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Zhou <...@alibaba.com>
Subject filterchain throws NullPointException
Date Wed, 28 Aug 2002 06:42:28 GMT
Hi,

try this task:

<copy file="c:/hello.txt" tofile="c:/hello.bak">
    <filterchain>
        <!--expandproperties/-->
        <filterreader classname="org.apache.tools.ant.filters.ExpandProperties"/>
    </filterchain>
</copy>

The preceding task will throw a NullPointException in the Ant 1.5.

The same thing happens when I'm trying to make my own filter, which
extends from BaseParamFilterReader and invokes getProject() to get some
informations from ant.  Unfortunately, getProject() returns null.

Uncomment the "<!--expandproperties/-->" in preceding task, and it works.
Is there any way to make my own filter work like the built-in filters?

-- 
Michael Zhou <zyh@alibaba.com>



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message