harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <g...@pobox.com>
Subject Re: [classlib] matching RI exceptions -- are we required to have this type of compatibility?
Date Tue, 25 Apr 2006 10:59:57 GMT


Jimmy, Jing Lv wrote:
>  > Geir Magnusson Jr wrote:
>>
>>
>> Vladimir Gorr wrote:
>>> Mikhail,
>>>
>>> I also thought about this scenario. However, if any TCK tests will 
>>> fail due
>>> to this reason
>>> we cannot certify our product. Nobody will talk about the invalidity 
>>> of TCK.
>>> Most likely we will update our sources.
>>
>> 1) I hadn't thought about this before, but it seems much cleaner to 
>> throw A (rather than B extends A) if the spec says to throw A.
>>
> I agree.
> But there are at least two exceptional situation:
> 1) several exceptions throws from one method, which extend one parent 
> class, e.g. ConnectionException and UnknownHostException, javadoc writes 
> "throws IOException" rather than "throws 
> ConnectionException,UnknownHostException". And in implementation, we 
> shall throw them out directly instead of
> try{...
> }catch(UnknownHostException e){
>     throw new IOException();
> }
> catch(ConnectionException e){
>     throw new IOException();
> }
> right? :)

Agreed.  What I meant was not throwing some internal class whose 
ancestor is ...

geir


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