harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Harley <george.c.har...@googlemail.com>
Subject Re: [classlib] Exception-throwing compatibility question
Date Fri, 30 Jun 2006 11:58:32 GMT
Mikhail Loenko wrote:
> For the example I've started this thread with it seems that complying
> the spec is
> more appropriate there. But probably there are other examples that
> caused that the doc was worded the given way
>
> George and Tim could you please comment?
>
> Thanks,
> Mikhail

Hi Mikhail,

I love this topic !

FWIW, my gut feel is that we should minimise any disruption to user 
applications that move from RI to Harmony. If the spec says Exception1 
should result and the RI actually throws Exception2 then my preference 
would be for the Harmony code to throw Exception2 (i.e. match the 
runtime behaviour of the RI) and raise the matter in a Sun bug. There is 
always the possibility that it is the method Javadoc that is incorrect. 
If and when the matter gets addressed in the RI so that the spec and the 
behaviour coincide, we make any necessary updates to our code. That way 
we help clarify the spec and keep ourselves consistent with what 
migrating users expect from their Java runtime.

Sure, it is a problem if user application code critically depends on the 
kind of exception thrown from an API call but I would sooner have people 
using Harmony to run their apps with zero/minimal changes required than 
see breakages because Harmony has taken the moral high ground on a spec 
issue.

OK, you can all start throwing rocks at me now :-)

Best regards,
George


>
>
> 2006/6/30, Paulex Yang <paulex.yang@gmail.com>:
>> Anton Avtamonov wrote:
>> > On 6/30/06, Mikhail Loenko <mloenko@gmail.com> wrote:
>> >> But section "Exception-throwing compatibility" says that exceptions
>> >> are different
>> >> and we aim "to be fully compartible with the RI" "by matching the
>> >> exception characteristics of each method".
>> >
>> > I believe that it is for "However, in most cases the specification
>> > does not describe all possible exceptions that may be thrown" case
>> > only.
>> > In case the spec is complete and not looks like a bug I would vote to
>> > follow the spec.
>> +1 from me.
>> >
>> > Wishes,
>>
>>
>> -- 
>> Paulex Yang
>> China Software Development Lab
>> IBM
>>
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message