|
bug-to-bug compatibility - another issue: msg#00926java.harmony.devel
Following the discussion before, I have another issue about RI's "bug", try this little test below: import java.nio.charset.*; public class DecoderTest{ public static void main(String[] args){ CharsetDecoder decoder = Charset.forName("utf-8").newDecoder(); decoder.reset(); decoder.flush(CharBuffer.allocate(10)); } } It quits quietly on Harmony, while on RI(JDK 5.0/1.4.2), it throws exception like below: java.lang.IllegalStateException: Current state = RESET, new state = FLUSHED at java.nio.charset.CharsetDecoder.throwIllegalStateException(Unknown Source) at java.nio.charset.CharsetDecoder.flush(Unknown Source) ........ But the spec of CharsetDecoder.flush() says: Throws: IllegalStateException - If the previous step of the current decoding operation was an invocation neither of the reset method nor of the three-argument decode method with a value of true for the endOfInput parameter It's so interesting that the spec emphasizes it SHOULD NOT throw IllegalStateException when flush() just after reset(). In fact, this is just one example of contradiction between spec and RI's CharsetDecoder/Encoder internal status implementation. These *bugs* are serious so that the RI's Decoder/Encoder must be used by experiment. Should Harmony be compatible with RI? -- Paulex Yang China Software Development Lab IBM
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Proposal: Wrap ICU4J to implement java.text.DecimalFormat enhancement of Java 5.0, Paulex Yang |
|---|---|
| Next by Date: | Re: auth natives (was: Re: svn commit: r378390 - in /incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/auth: ./ auth_copyright.c authwin32.c authwin32.h hyauth.def hyauth.rc makefile), Stepan Mishura |
| Previous by Thread: | Re: Bug-to-bug compatibility - first issue, Geir Magnusson Jr |
| Next by Thread: | Re: bug-to-bug compatibility - another issue, Mikhail Loenko |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |