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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to