avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <j...@socialchange.net.au>
Subject Removing dep on CascadingException in collections
Date Fri, 29 Mar 2002 05:44:47 GMT

A general question about compatibility. If we have two classes:

public class Base { ... }
public class Derived extends Base { ... }

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

I'd like to remove that dependence, since it's the only thing tying
collections to framework. The public interface will be identical, but
typecasts will break.

I this case, I think the advantage weighs out the cost, because I can't
think why anyone would want to typecast a RuntimeException, which are
not even meant to be caught, let alone played with. But that's just me.
So I'll go ahead with the change, and roll back if anyone disagrees :)


To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

View raw message