You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jarek Czekalski <ja...@poczta.onet.pl> on 2012/03/03 14:10:21 UTC
fileset not iterable
Hi all
When I was scripting in ant, I could write
for (f: fs)
where fs is a FileSet. But after switching to ant tasks in java, it is
no longer available. I get a compile error:
foreach not applicable to expression type
I guess it's pretty easy to just write FileSet implements Iterable, but
have not tried it in the source. If it is really easy, then I suggest
adding it to all methods returning iterator().
Regards
Jarek
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: fileset not iterable
Posted by Matt Benson <gu...@gmail.com>.
On Sat, Mar 3, 2012 at 7:10 AM, Jarek Czekalski
<ja...@poczta.onet.pl> wrote:
> Hi all
>
> When I was scripting in ant, I could write
>
> for (f: fs)
>
> where fs is a FileSet. But after switching to ant tasks in java, it is no
> longer available. I get a compile error:
>
> foreach not applicable to expression type
>
> I guess it's pretty easy to just write FileSet implements Iterable, but have
> not tried it in the source. If it is really easy, then I suggest adding it
> to all methods returning iterator().
>
Hi, Jarek. Ant has only just recently voted to adopt Java 5 in its
trunk development (being a build tool it has tried to remain as
accessible as possible even to those stuck on what are by today's
standards thought of as archaic Java platforms). In the future the
Iterable interface could be implemented as you suggest.
Thanks,
Matt
> Regards
> Jarek
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org