Re: [classlib] Enum ready to go

2006-06-07 Thread Andrew Zhang
Hi, Stepan, The test you metioned is passed in my environment: RI version: 1.5.0_02. Linux: Read hat Enterprise Linux AS(2.4.21-15.EL) Is the problem caused by earlier version javac? I remember that RI of earlier verion throws IAE instead of NPE when the arguement is null. Would you please

Re: [classlib] Enum ready to go

2006-06-07 Thread Mikhail Loenko
Hi Andrew Did you update your workspace? Thanks, Mikhail 2006/6/7, Andrew Zhang [EMAIL PROTECTED]: Hi, Stepan, The test you metioned is passed in my environment: RI version: 1.5.0_02. Linux: Read hat Enterprise Linux AS(2.4.21-15.EL) Is the problem caused by earlier version javac? I

Re: [classlib] Enum ready to go

2006-06-07 Thread Andrew Zhang
Hi, Mikhail, Of course I DID... On 6/7/06, Mikhail Loenko [EMAIL PROTECTED] wrote: Hi Andrew Did you update your workspace? Thanks, Mikhail 2006/6/7, Andrew Zhang [EMAIL PROTECTED]: Hi, Stepan, The test you metioned is passed in my environment: RI version: 1.5.0_02. Linux: Read hat

Re: [classlib] Enum ready to go

2006-06-07 Thread Jimmy, Jing Lv
Stepan Mishura wrote: I found the reason - tests expect NPE when valueOf(null) is invoked but IAE is thrown instead. For example, java.lang.IllegalArgumentException at org.apache.harmony.tests.java.lang.EnumTest$Sample.valueOf(EnumTest.java :22) at

Re: [classlib] Enum ready to go

2006-06-07 Thread Tim Ellison
The Sun 1.5.0_06 compiler was driven directly by our build scripts (so using jsr14) and the Eclipse 3.2RC4 compiler has source 1.5 target 1.4 set. I could throw an IAE from Enum#valueOf(Class, null) when the Enum is empty, but seems a bit of a drag to work around the compilers. (which version of

Re: [classlib] Enum ready to go

2006-06-07 Thread Mikhail Loenko
2006/6/7, Tim Ellison [EMAIL PROTECTED]: The Sun 1.5.0_06 compiler was driven directly by our build scripts (so using jsr14) and the Eclipse 3.2RC4 compiler has source 1.5 target 1.4 set. I could throw an IAE from Enum#valueOf(Class, null) when the Enum is empty, but seems a bit of a drag to

Re: [classlib] Enum ready to go

2006-06-07 Thread Jimmy, Jing Lv
Mikhail Loenko wrote: 2006/6/7, Tim Ellison [EMAIL PROTECTED]: The Sun 1.5.0_06 compiler was driven directly by our build scripts (so using jsr14) and the Eclipse 3.2RC4 compiler has source 1.5 target 1.4 set. I could throw an IAE from Enum#valueOf(Class, null) when the Enum is empty, but

Re: [classlib] Enum ready to go

2006-06-07 Thread Tim Ellison
Jimmy, Jing Lv wrote: Mikhail Loenko wrote: 2006/6/7, Tim Ellison [EMAIL PROTECTED]: The Sun 1.5.0_06 compiler was driven directly by our build scripts (so using jsr14) and the Eclipse 3.2RC4 compiler has source 1.5 target 1.4 set. I could throw an IAE from Enum#valueOf(Class, null) when

Re: [classlib] Enum ready to go

2006-06-07 Thread Mikhail Loenko
javac and java are from the same distrib (javac does not print detailed version info, that is why I''m mentioning java version), so it is javac 1.5.0_b64 so I compile with JDK 1.5.0_b64, run on Harmony and it fails Thanks, Mikhail 2006/6/7, Jimmy, Jing Lv [EMAIL PROTECTED]: Mikhail Loenko

Re: [classlib] Enum ready to go

2006-06-07 Thread Mikhail Loenko
now two out of three yesterday's tests pass, one still fails: tests.api.java.net.AuthenticatorTest Thanks, Mikhail 2006/6/7, Tim Ellison [EMAIL PROTECTED]: So the ECJ folk are going to modify their compiler to dispatch to Enum#valueOf(Class, String) too [1] -- which means we get to decide the

Re: [classlib] Enum ready to go

2006-06-06 Thread Geir Magnusson Jr
cool! (I didn't remember you were working on it... excellent) Tim Ellison wrote: Heads up that I completed the implementation of j.l.Enum today; so you can go mad and use enum types in classlib code for real now. I wrote a bunch of tests but if you could hammer on it and try to break it

Re: [classlib] Enum ready to go

2006-06-06 Thread Mikhail Loenko
I see two failing tests. Does anybody see them too? org.apache.harmony.tests.java.lang.EnumTest tests.api.java.net.ProxyTest Thanks, Mikhail 2006/6/7, Geir Magnusson Jr [EMAIL PROTECTED]: cool! (I didn't remember you were working on it... excellent) Tim Ellison wrote: Heads up that I

Re: [classlib] Enum ready to go

2006-06-06 Thread Stepan Mishura
Hi Tim, On 6/7/06, Tim Ellison wrote: Heads up that I completed the implementation of j.l.Enum today; so you can go mad and use enum types in classlib code for real now. Cool! I wrote a bunch of tests but if you could hammer on it and try to break it that would be good :-) And did you

Re: [classlib] Enum ready to go

2006-06-06 Thread Andrew Zhang
Hello Stepan and Mikhail, All tests passed on my machine. Which test case was failed in your environment, on RI or Harmony? Thanks! On 6/7/06, Stepan Mishura [EMAIL PROTECTED] wrote: Hi Tim, On 6/7/06, Tim Ellison wrote: Heads up that I completed the implementation of j.l.Enum today; so

Re: [classlib] Enum ready to go

2006-06-06 Thread Andrew Zhang
Exciting news! :) And I also found some mocked enum classes (e.g. java.net.Proxy.Type java.net.Authenticator.Request) had already been updated as real enum style! :) But things don't end. We should be aware of serialization issue of enum type class, that means readObject method may be

Re: [classlib] Enum ready to go

2006-06-06 Thread Stepan Mishura
I found the reason - tests expect NPE when valueOf(null) is invoked but IAE is thrown instead. For example, java.lang.IllegalArgumentException at org.apache.harmony.tests.java.lang.EnumTest$Sample.valueOf(EnumTest.java :22) at