|
Re: bug-to-bug compatibility - another issue: msg#00931java.harmony.devel
On 2/22/06, Paulex Yang <paulex.yang@xxxxxxxxx> wrote: [snip] > > 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? Hi Paulex, I have no deep knowledge in this area and therefore cannot really judge the possible impact. My opinion is from common sense only: - spec DEFINITELY states exception should not be thrown and people DEFINITELY take this into account - I cannot believe applications really EXPECT this exception to detect this particular scenario and do something specific for the case flush() is called after reset(). Most likely application just stop processing if exception occur. Exception is terated as a 'signal that something is wrong'. - I cannot find what is wrong in calling flush() after reset(). Looks like quite normal operation. Spec proves that. My opinion here - to follow the spec. At least unless we really have an application failing on that (what I personally hardly believe to happen). -- Anton Avtamonov, Intel Middleware Products Division
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: bug-to-bug compatibility - another issue, Mikhail Loenko |
|---|---|
| Next by Date: | Re: bug-to-bug compatibility - another issue, Paulex Yang |
| Previous by Thread: | Re: bug-to-bug compatibility - another issue, Anton Avtamonov |
| Next by Thread: | Re: bug-to-bug compatibility - another issue, Paulex Yang |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |