George,

Totally agree with you.

Shall we summarize and document the discuss to Harmony exception-thrown
compatibility guideline?

Thanks!


On 6/30/06, George Harley <[EMAIL PROTECTED]> wrote:

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 <[EMAIL PROTECTED]>:
>> Anton Avtamonov wrote:
>> > On 6/30/06, Mikhail Loenko <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Andrew Zhang
China Software Development Lab, IBM

Reply via email to