commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <si...@ecnetwork.co.nz>
Subject Re: [digester] update Rule classes using deprecated methods?
Date Mon, 05 Apr 2004 21:38:00 GMT
On Tue, 2004-04-06 at 07:43, robert burrell donkin wrote:
> On 5 Apr 2004, at 02:52, Simon Kitching wrote:
> 
> <snip>
> 
> > What I'm proposing is not to change the Rule class [whose default
> > body(namespace,name,text) method delegates to the deprecated body(text)
> > etc].
> >
> > What I'm proposing is to fix classes like CallMethodRule and
> > CallParamRule which override the deprecated version, to make them
> > override the "proper" version instead.
> >
> > This should save an extra method call (the undeprecated->deprecated
> > forward in Rule) + make CallParamRule etc compile without deprecation
> > warnings + make sure that people copying-and-pasting from Digester rule
> > source don't end up using the deprecated versions.
> >
> > In binary-compatibility terms, any user class subclassing Rule will be
> > ok, because that class will not change. I *think* that this is in fact 
> > a
> > 100% binary-compatible change, but would not bet on it as this isn't a
> > topic I know much about.
> 
> (i hope the following explains things a little better)
> 
> (unsurprisingly;) craig's usually pretty good on knowledge of the java 
> specification. my reading indicated that your suggested change would be 
> binary compatible but is quite possible craig knows something i 
> don't...
> 
> the symantic incompatibility occurs if a users has created a subclass 
> of CallParamRule (say) which overrides one of the deprecated methods. 
> if CallParamRule is changed so that it override the new method then the 
> overridden method will never be called in the users subclass. this will 
> break the behaviour of the subclass and is (what i mean by) a symantic 
> incompatibility: it breaks the API contract.

Good point. In that case fixing this problem can wait until 2.0.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message