On Fri, Mar 29, 2002 at 08:54:00AM -0500, Berin Loritsch wrote: > > -----Original Message----- > > From: Jeff Turner [mailto:[EMAIL PROTECTED]] ... > > I would like to make Derived no longer extend Base, but > > otherwise maintain API compatibility by reimplementing Base's > > public methods. Any code that typecasts Derived to Base will > > break. I'm wondering, do we (or should we) guarantee this > > sort of compatibility? > > > > In my case, I have: > > > > public class CascadingRuntimeException // in framework > > > > public class BufferOverflowException > > extends CascadingRuntimeException // in Excalibur's > > collections package > > We can probably do it in this case. If people cast the Exception > to anything, it was RuntimeException or BuferOverflowException.
Good. Btw, I see the same situation in the Event code.. :) ... > > because I can't think why anyone would want to typecast a > > RuntimeException, which are not even meant to be caught, let ... > RuntimeExceptions are meant to be caught, because they can be > gracefully recovered from. It is Errors that are not meant to > be caught--you can't do anything to recover from it. Ah ok. I meant, as opposed to regular Exceptions which must be explicitly caught or let through. --Jeff -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
