commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34038] - Registered Converter not utilized when leveraging .addFactoryCreate
Date Wed, 16 Mar 2005 22:29:23 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34038>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34038


skitching@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From skitching@apache.org  2005-03-16 23:29 -------
Hi Ed,

Firstly, this is really a "how to use digester question", not a bug.
It would be better to post such a question to the
commons-user@jakarta.apache.org list than create a bugzilla entry (which is
meant to be for filing bugs and enhancement-requests).

I presume that what is happening is:
1)
You use FactoryCreateRule to create an instance of some object of class "X", and
this object is pushed onto the digester stack
2) 
You then use SetNextRule or CallMethodRule to pass the object on the top of the
stack (the one created above) to a method on the second-to-top object. The
method you want to be called has a parameter of type "Y", and you want your
custom converter to be used in order to convert from X to Y.

It doesn't matter that FactoryCreateRule's createObject method declares itself
to return Object; at runtime calling method obj.getClass() will return the
actual type, and this is what matters.

However the SetNextRule doesn't use ConvertUtils to convert parameter types;
only CallMethodRule provides this functionality. Digester 1.6 enhanced the
CallMethodRule class to take a "targetOffset" parameter to its constructor, so
CallMethodRule can now emulate SetNextRule (but with type conversion).

If you were not using SetNextRule, then I suggest you do some more investigation
(including turning digester logging on) then post your followup questions to the
commons-user email list. See http://wiki.apache.org/jakarta-commons/Digester/FAQ
for information on enabling logging in digester.

Regards,

Simon

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
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