You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/11/28 19:31:06 UTC
DO NOT REPLY [Bug 41058] New: - [PATCH] Support JDK 5 enumerations for attribute values
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41058>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41058
Summary: [PATCH] Support JDK 5 enumerations for attribute values
Product: Ant
Version: 1.7.0RC1
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Core
AssignedTo: jglick@netbeans.org
ReportedBy: jglick@netbeans.org
CC: dev@ant.apache.org
I have a working patch to let you use enums in place of EnumeratedAttribute,
which is more convenient and intuitive if you are using JDK 5 anyway. Example:
<project default="x">
<target name="x">
<echo file="T.java">
public class T extends org.apache.tools.ant.Task {
public enum E {
first,
second,
third
}
private E thing;
public void setThing(E e) {
thing = e;
}
public void execute() {
log("thing=" + thing);
}
}
</echo>
<javac srcdir="." destdir="." includes="T.java"/>
<taskdef name="twaddle" classname="T" classpath="."/>
<twaddle thing="third"/>
<antstructure output="ant.dtd"/>
<loadfile srcfile="ant.dtd" property="ant.dtd"/>
<echo>${ant.dtd}</echo>
</target>
</project>
I would commit it right now but there does not seem to be a branch for 1.7 yet
and I am reluctant to add features to a release in the RC phase.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: DO NOT REPLY [Bug 41058] - [PATCH] Support JDK 5 enumerations
for attribute values
Posted by Jesse Glick <je...@sun.com>.
Committed.
Steve Loughran wrote:
> the only thing I see this breaking is any class which has a java5 enum
> of a specific name, and a legacy enum with the same name.
You can't; enums and classes use the same namespace. Or maybe I'm
missing your point.
> you end up writing tasks that are java5+ only, of course.
Of course. But this is hardly a concern if the task is for your own use
and your project uses Java 5+ anyway.
-J.
--
jesse.glick@sun.com x22801 netbeans.org ant.apache.org
http://google.com/search?q=e%5E%28pi*i%29%2B1
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: DO NOT REPLY [Bug 41058] - [PATCH] Support JDK 5 enumerations
for attribute values
Posted by Steve Loughran <st...@apache.org>.
Jesse Glick wrote:
> bugzilla@apache.org wrote:
>>> It seems safe and useful for 1.7 .
>>
>> +1
>
> Any other +/-? It's not really clear to me what, if any, criteria there
> are for RFEs this late in the cycle. I *think* the patch is safe but you
> never know.
>
=0
the only thing I see this breaking is any class which has a java5 enum
of a specific name, and a legacy enum with the same name. Is this
likely? Not yet. Oh, and you end up writing tasks that are java5+ only,
of course.
If the change does go in, I'd have to update that bit of Ant in Action
(that's its new name, BTW), which is not too late. And we'd simplify the
code because there's no need to discuss Ant enums at all. So I think
ultimately it would benefit end users.
-steve
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: DO NOT REPLY [Bug 41058] - [PATCH] Support JDK 5 enumerations for attribute values
Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hi,
the patch seems good.
+1
Antoine
On Nov 28, 2006, at 5:05 PM, Dominique Devienne wrote:
> +1 to the patch, but +0 for 1.7.0.
>
> It's for the release manager to decide, but there's no critical need
> for this patch AFAIK to warrant cutting a new release. --DD
>
> On 11/28/06, Jesse Glick <je...@sun.com> wrote:
>> bugzilla@apache.org wrote:
>> >> It seems safe and useful for 1.7 .
>> >
>> > +1
>>
>> Any other +/-? It's not really clear to me what, if any, criteria
>> there
>> are for RFEs this late in the cycle. I *think* the patch is safe
>> but you
>> never know.
>>
>> -J.
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: DO NOT REPLY [Bug 41058] - [PATCH] Support JDK 5 enumerations for attribute values
Posted by Dominique Devienne <dd...@gmail.com>.
+1 to the patch, but +0 for 1.7.0.
It's for the release manager to decide, but there's no critical need
for this patch AFAIK to warrant cutting a new release. --DD
On 11/28/06, Jesse Glick <je...@sun.com> wrote:
> bugzilla@apache.org wrote:
> >> It seems safe and useful for 1.7 .
> >
> > +1
>
> Any other +/-? It's not really clear to me what, if any, criteria there
> are for RFEs this late in the cycle. I *think* the patch is safe but you
> never know.
>
> -J.
>
> --
> jesse.glick@sun.com x22801 netbeans.org ant.apache.org
> http://google.com/search?q=e%5E%28pi*i%29%2B1
>
>
> ---------------------------------------------------------------------
> 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
Re: DO NOT REPLY [Bug 41058] - [PATCH] Support JDK 5 enumerations
for attribute values
Posted by Jesse Glick <je...@sun.com>.
bugzilla@apache.org wrote:
>> It seems safe and useful for 1.7 .
>
> +1
Any other +/-? It's not really clear to me what, if any, criteria there
are for RFEs this late in the cycle. I *think* the patch is safe but you
never know.
-J.
--
jesse.glick@sun.com x22801 netbeans.org ant.apache.org
http://google.com/search?q=e%5E%28pi*i%29%2B1
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 41058] - [PATCH] Support JDK 5 enumerations for attribute values
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41058>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41058
------- Additional Comments From jglick@netbeans.org 2006-11-28 10:35 -------
Created an attachment (id=19185)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=19185&action=view)
Proposed patch
Working patch against current trunk sources.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 41058] - [PATCH] Support JDK 5 enumerations for attribute values
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41058>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41058
jglick@netbeans.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |1.7.0
------- Additional Comments From jglick@netbeans.org 2006-12-01 09:54 -------
Got some +1s, some +0s. Rev #481322.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 41058] - [PATCH] Support JDK 5 enumerations for attribute values
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41058>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41058
------- Additional Comments From alexeys@inventigo.com 2006-11-28 10:43 -------
It seems safe and useful for 1.7 .
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 41058] - [PATCH] Support JDK 5 enumerations for attribute values
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41058>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41058
------- Additional Comments From peterreilly@apache.org 2006-11-28 10:41 -------
That is pretty nice!
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 41058] - [PATCH] Support JDK 5 enumerations for attribute values
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41058>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41058
------- Additional Comments From gudnabrsam@yahoo.com 2006-11-28 11:21 -------
(In reply to comment #3)
> It seems safe and useful for 1.7 .
+1
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 41058] - [PATCH] Support JDK 5 enumerations for attribute values
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41058>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41058
------- Additional Comments From jglick@netbeans.org 2006-12-01 10:10 -------
And docs: 481329.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org