commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramon Nogueira" <>
Subject Digester: Unintuitive call order of addCallParam()
Date Mon, 21 May 2007 21:01:57 GMT

Just thought I'd make a suggestion: I struggled for about 2 hours
trying to get Digester to call a method on an object with
CallParamRule and CallMethodRule. I kept getting NullPointerExceptions
(actually, worse - the source of the exception was obscured by the SAX
interfaces and I had to dig to find the NullPointerException happening
in CallParamRule). The problem turned out to be that I was adding the
CallParamRule before the CallMethodRule. Firstly, I think the required
call sequence should be better documented. Secondly, some more
descriptive exception should have been thrown. Thirdly, I don't think
this should be an error at all: when you're dealing with a stack
abstraction it is natural to _first_ push arguments onto the stack and
_then_ call the method: I have never encountered a stack machine that
doesn't work like this. The digester approach is totally

Ramon Nogueira

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message