harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paulex Yang <paulex.y...@gmail.com>
Subject Re: bug-to-bug compatibility - another issue
Date Wed, 22 Feb 2006 10:05:34 GMT
Anton Avtamonov wrote:
> On 2/22/06, Paulex Yang <paulex.yang@gmail.com> 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).
>   
+1 from me:).

This paragraph is just what I want to say about the bug compatibility, 
my idea is:
1. we should comply with spec
2. if RI is contradict with spec, and RI is not logical(sometimes it is 
very obvious, you know what I mean), we comply with RI; else, we discuss 
it case by case.
3. if spec is not so clear, we should comply with RI
4. if some application failing on that different behavior, we discuss it 
case by case



> --
> Anton Avtamonov,
> Intel Middleware Products Division
>
>   


-- 
Paulex Yang
China Software Development Lab
IBM



Mime
View raw message