ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: Ant 1.5Beta1 -- Available.FileDir
Date Tue, 14 May 2002 00:54:54 GMT
----- Original Message -----
From: "Bryan Pendleton" <bpendleton@amberpoint.com>

> To remove the deprecation warning when upgrading my
> code from Ant 1.4.1 to Ant 1.5, is it correct to
> change:
>
>   avail = (Available)project.createTask("available");
>   avail.setType("dir");
>
> to
>
>   avail = (Available)project.createTask("available");
>   fileDir = new Available.FileDir();
>   fileDir.setValue("dir");
>   avail.setType(fileDir);
>
> If that's correct, is there a more concise way to say it?

That is correct, and there is no more concise way to say it.


> I tried
>
>   avail.setType(new Available.FileDir("dir"));
>
> but that failed to compile.

Available.FileDir is an EnumeratedAttribute and has no string-arg
constructor (although it arguably really should, eliminating the setValue
necessity, and probably a few lines of code in IntrospectionHelper too).

At least we didn't break the old API on this one for you!  :)  (just
deprecated it)

Thanks for the reports of 1.4.1 custom task migration to 1.5beta.

    Erik



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


Mime
View raw message