You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Simon Kitching <si...@ecnetwork.co.nz> on 2004/04/03 09:06:54 UTC

[digester] update Rule classes using deprecated methods?

Hi,

I see that a number of Rule classes in digester are still using the
deprecated versions of the begin/body/end methods.

In a minor-version release (1.5 -> 1.6), are we allowed to change these
classes to use the newer methods?

Thanks,

Simon


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


Re: [digester] update Rule classes using deprecated methods?

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On 4 Apr 2004, at 18:02, Craig McClanahan wrote:

> robert burrell donkin wrote:
>
>> from my reading of the java specification, moving methods upwards in 
>> the inheritance hierarchy is backwards compatible (in binary terms). 
>> (hopefully someone will correct me if i've made a mistake.)
>>
> It's "recompile compatible" (i.e. it works if you recompile the 
> calling program against the new classes, but not "binary compatible".  
> I'm not sure I would sweat it on this particular point (as long we we 
> made people aware of the requirement in release notes), but your 
> second issue is more important.

<ot>
interesting. here's the section (in the 2.0 language specification):

"... here is a list of some important binary compatible changes that 
the Java programming language supports:

...
Moving a method upwards in the class hierarchy"

i had taken this as meaning that an implementation in a subclass can be 
removed so long as the superclass provides an implementation for that 
method.
</ot>

>> it's possible that there are some cases of symantic incompatibility 
>> for user subclasses (overriding the deprecated methods that will 
>> never be called if the rule implementations are changed). since the 
>> methods have been deprecated for a long time now (digester 1.4, i 
>> think), for me, this isn't such an issue (as it once was) provided 
>> that it was strongly highlighted in the release documents.
>>
> If we were to stop calling the deprecated versions, we've definitely 
> changed the semantics.  It would essentially have the same semantic 
> effect as actually removing the methods, so I think we should continue 
> to call them until a 2.x series of Digester builds.
>
> Maybe it's time to consolidate what we've learned from the 1.x 
> versions of both beanutils and digester into more streamlined APIs, 
> and start down that path?

+0 (for digester, beanutils needs more thought)

i think that maybe the time is right for digester 2 and i'd be very 
happy to see people starting work on it.

personally speaking, though, i do have a small number of improvements 
that i'd like to see to the original digester in particular supporting 
processing instructions and better resolution of relative entities. 
this would (for me) bring digester to a state where the application was 
(in some ways) a completion of the original design. i like the idea of 
leaving digester in a complete-but-design-limited state. (this 
shouldn't impede any push for a new digester.)

but to be honest i probably don't have the energy required to push 
something like digester 2 through right now. a lot would depend on 
whether others were willing to step up.

- robert


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


Re: [digester] update Rule classes using deprecated methods?

Posted by Craig McClanahan <cr...@apache.org>.
robert burrell donkin wrote:

> from my reading of the java specification, moving methods upwards in 
> the inheritance hierarchy is backwards compatible (in binary terms). 
> (hopefully someone will correct me if i've made a mistake.)
>
It's "recompile compatible" (i.e. it works if you recompile the calling 
program against the new classes, but not "binary compatible".  I'm not 
sure I would sweat it on this particular point (as long we we made 
people aware of the requirement in release notes), but your second issue 
is more important.

> it's possible that there are some cases of symantic incompatibility 
> for user subclasses (overriding the deprecated methods that will never 
> be called if the rule implementations are changed). since the methods 
> have been deprecated for a long time now (digester 1.4, i think), for 
> me, this isn't such an issue (as it once was) provided that it was 
> strongly highlighted in the release documents.
>
If we were to stop calling the deprecated versions, we've definitely 
changed the semantics.  It would essentially have the same semantic 
effect as actually removing the methods, so I think we should continue 
to call them until a 2.x series of Digester builds.

Maybe it's time to consolidate what we've learned from the 1.x versions 
of both beanutils and digester into more streamlined APIs, and start 
down that path?

> i would be interest to hear what other people think about this one 
> (including lurking users).
>
> - robert
>
Craig

> On 3 Apr 2004, at 08:06, Simon Kitching wrote:
>
>> Hi,
>>
>> I see that a number of Rule classes in digester are still using the
>> deprecated versions of the begin/body/end methods.
>>
>> In a minor-version release (1.5 -> 1.6), are we allowed to change these
>> classes to use the newer methods?
>>
>> Thanks,
>>
>> Simon
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org



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


Re: [digester] update Rule classes using deprecated methods?

Posted by Simon Kitching <si...@ecnetwork.co.nz>.
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


Re: [digester] update Rule classes using deprecated methods?

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
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.

- robert


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


Re: [digester] update Rule classes using deprecated methods?

Posted by Simon Kitching <si...@ecnetwork.co.nz>.
On Sun, 2004-04-04 at 22:44, robert burrell donkin wrote:
> from my reading of the java specification, moving methods upwards in 
> the inheritance hierarchy is backwards compatible (in binary terms). 
> (hopefully someone will correct me if i've made a mistake.)
> 
> it's possible that there are some cases of symantic incompatibility for 
> user subclasses (overriding the deprecated methods that will never be 
> called if the rule implementations are changed). since the methods have 
> been deprecated for a long time now (digester 1.4, i think), for me, 
> this isn't such an issue (as it once was) provided that it was strongly 
> highlighted in the release documents.
> 
> i would be interest to hear what other people think about this one 
> (including lurking users).
> 
> - robert
> 
> On 3 Apr 2004, at 08:06, Simon Kitching wrote:
> 
> > Hi,
> >
> > I see that a number of Rule classes in digester are still using the
> > deprecated versions of the begin/body/end methods.
> >
> > In a minor-version release (1.5 -> 1.6), are we allowed to change these
> > classes to use the newer methods?

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.

Regards,

Simon


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


Re: [digester] update Rule classes using deprecated methods?

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
from my reading of the java specification, moving methods upwards in 
the inheritance hierarchy is backwards compatible (in binary terms). 
(hopefully someone will correct me if i've made a mistake.)

it's possible that there are some cases of symantic incompatibility for 
user subclasses (overriding the deprecated methods that will never be 
called if the rule implementations are changed). since the methods have 
been deprecated for a long time now (digester 1.4, i think), for me, 
this isn't such an issue (as it once was) provided that it was strongly 
highlighted in the release documents.

i would be interest to hear what other people think about this one 
(including lurking users).

- robert

On 3 Apr 2004, at 08:06, Simon Kitching wrote:

> Hi,
>
> I see that a number of Rule classes in digester are still using the
> deprecated versions of the begin/body/end methods.
>
> In a minor-version release (1.5 -> 1.6), are we allowed to change these
> classes to use the newer methods?
>
> Thanks,
>
> Simon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>


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