ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: copy/map bug when no match
Date Thu, 07 Dec 2000 13:15:53 GMT
Raphael PIERQUIN <pierquin@agisphere.com> wrote:

> If I need to rename every file *.toto into *.tata,
> I would intuitivly use a move task a follow :
> <my-example>
>     <move todir="mydir">
>            <fileset dir="mydir"/>
>            <mapper type="regexp" from="(.*)\.toto" to="\1\.tata" />
>     </move>
> </my-example>
> 
> ant will throw a NullPointerException if the move task meets a file
> that does not end in '.toto'

Yes, this was a bug. The intended behavior is to copy nothing. The
problem arises when the overwrite attribute has been set to true,
which is the default for <move>.

Fixed a few seconds ago, thanks.

Stefan

BTW, I'd use a glob mapper in a simple case like this, which is easier
to read and more efficient at the same time.

Mime
View raw message