commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <martin.coo...@tumbleweed.com>
Subject RE: [digester] CallMethodRule bug
Date Wed, 17 Jul 2002 17:37:09 GMT


> -----Original Message-----
> From: robert burrell donkin [mailto:robertdonkin@mac.com]
> Sent: Wednesday, July 17, 2002 10:35 AM
> To: Jakarta Commons Developers List
> Subject: [digester] CallMethodRule bug
> 
> 
> at the moment:
> 
> 1. the java doc comments have always said that methods with 
> primitive arg 
> could be called by passing in corresponding java.lang classes 
> (eg. Boolean)
> .
> 2. this doesn't work!
> 3. CallMethodRule uses invokeExactMethod (rather than invokeMethod)
> 
> 
> invokeExactMethod uses class.getMethod. in order to support matching 
> primitives with java.lang classes, this would need to work more like 
> invokeMethod. i'd prefer to change invokeMethod so that it 
> supports this 
> kind of matching and change CallMethodRule to use 
> invokeMethod by default 
> and invokeExactMethod with a flag.
> 
> this may subtly break some digestion rulesets (since invokeMethod may 
> under some rare circumstances return a different match from 
> invokeExactMethod) which will have to be fixed by setting 
> flags on some 
> CallMethodRules. we didn't have any complaints from users 
> when we made 
> this change for other rules so i'm pretty confident that the 
> incompatibility doesn't occur often in the wild.

Can you say more on the "rare circumstances"? Would this just be when there
are multiple overloads that would match inexactly, while only one would
match exactly?

> is this a good plan?

Assuming the rare circumstances really are that, then yes, this sounds like
a good plan to me. Support for primitive types is a good thing!

--
Martin Cooper


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


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


Mime
View raw message