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 14523] New: - SetNextRule can't convert type authomatically
Date Wed, 13 Nov 2002 19:41:05 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14523>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14523

SetNextRule can't convert type authomatically

           Summary: SetNextRule can't convert type authomatically
           Product: Commons
           Version: Nightly Builds
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Digester
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: eu@md.pp.ru


I have the case, when one of the methods requires array of some particular
type to be passed as a parameter. Unfortunately I can only create
java.util.LinkedList object with the same content and then I was thinking to use
SetNextRule to call that method. This works for the similar situation with
the CallMethodRule and Digester is using the registered Convertors from 
BeanUtils framework to handle different types. Unfortunately SetNextRule does 
not using convertors in the similar situation. This is should be very simple to 
fix (see diff for a SetNextRule class below).

252a253,256
>         // Convert parameter to the required type
>         if( !paramTypes[ 0].isAssignableFrom( child.getClass()))
>           child = ConvertUtils.convert( child, paramTypes[ 0]);
>

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