ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: DO NOT REPLY [Bug 41058] - [PATCH] Support JDK 5 enumerations for attribute values
Date Thu, 30 Nov 2006 09:08:26 GMT
>Jesse Glick wrote:
>> bugzilla@apache.org wrote:
>>>> It seems safe and useful for 1.7 .
>>>
>>> +1


useful: +1, many people are writing on Java5, Java6 is ante portas.


>> 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.

Yes - very late. It's not a checkstyle or doco-patch ...
You have done a complete test I think?



>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. 

You mean that?

public class T extends org.apache.tools.ant.Task {
  public enum ThingEn { first, second, third }
  private ThingEn enThing;
  public void setThing(ThingEn e) {
    thing = e;
  }
  public ThingEA extends EnumeratedAttribute {
    public String[] getValues() { return new String[]{"first", "second",
"third"}; }
  }
  private ThingEA eaThing;
  public void setThing(ThingEA e) {
    eaThing = e;
  }
}

--> two "setThing()" methods




>Oh, and you end up writing tasks that are java5+ only, of course.

Nothing for Ant itself - but if the writer wants to use Java5, he will
do that.
But supporting enum it would be easier to forget, that enum is Java5+
... that's right.

Maybe we could spent a refactoring "convert enum to EnumeratedAttribute"
;-)


>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. 

hihi .... "Author in Action" ;-)



Jan

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


Mime
View raw message