harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Liang <richard.lian...@gmail.com>
Subject Re: [classlib][summary] Exception throwing compatibility
Date Wed, 09 Aug 2006 09:31:24 GMT


Mikhail Loenko wrote:
> 2006/8/9, Tim Ellison <t.p.ellison@gmail.com>:
>> Andrew Zhang wrote:
>> > "But there are some cases that RI throws an implementation specific
>> > exception, we shall throw its public superclass. e.g., If RI throws
>> > sun.io.MalformedInputException, we shall throw
>> > java.io.CharConversionException. "
>> >
>> > I think it's OK to throw Harmony-implement subclass of the public
>> > superclass
>> > for some cases? Do you think so?
>>
>> I agree.  In fact it says that in the preceding paragraph:
>
> but in the next paragraph it says:
>
> "If RI is compliant with the Java Specification We shall follow RI's
> behavior, that is, throws exactly the same exception. "
>
> I'd mention subclass here too.
>
I agree.  "Following RI" means throwing the same exception or its subclass.

>
>
> It might make sense to split "If RI is not compliant with the Java
> Specification"
> to two categories: when we thing the spec does not specify which
> excactly exception is thrown and when spec does specify but RI throws
> a different exception
If the spec does not specify which exception is thrown, I think RI *is* 
compliant with the specification. Am I wrong?

Thanks a lot.
Richard.
>
> Thanks,
> Mikhail
>
>
>
>
>>
>> "Harmony class library code should throw exceptions of the same runtime
>> class (or a subtype of that runtime class) as the RI, other than in
>> cases where the RI throws non-public types whereupon Harmony will throw
>> an exception with the same public supertype."
>>
>> [I'd replace 'should throw' with 'throws' though]
>>
>> Regards,
>> Tim
>>
>> > On 8/9/06, Richard Liang <richard.liangyx@gmail.com> wrote:
>> >>
>> >> Hello All,
>> >>
>> >> I'd like to update our "Exception-throwing compatibility"[1] to 
>> reflect
>> >> our discussion in several threads recently. I just created a wiki 
>> page
>> >> here[2], please kindly comment or update the wiki page directly. If
>> >> there is no objection, I will provide a patch for
>> >> site/xdocs/subcomponents/classlibrary/compat.xml
>> >>
>> >> Thanks a lot.
>> >>
>> >> [1]
>> >> 
>> http://incubator.apache.org/harmony/subcomponents/classlibrary/compat.html 
>>
>> >>
>> >> [2] http://wiki.apache.org/harmony/Exception-throwing_compatibility
>> >>
>> >> --
>> >> Richard Liang
>> >> 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
>> >>
>> >>
>> >
>> >
>>
>> -- 
>>
>> Tim Ellison (t.p.ellison@gmail.com)
>> IBM Java technology centre, UK.
>>
>> ---------------------------------------------------------------------
>> 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
>
>

-- 
Richard Liang
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


Mime
View raw message