axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@us.ibm.com>
Subject Re: DO NOT REPLY [Bug 16844] - MapDeserializer creates only HashMaps, throwing ClassCastException when assigning
Date Tue, 18 Feb 2003 01:20:08 GMT
Sounds like a plan.  While I'm going through fixing *other* bugs, perhaps 
*you* could go fix this one ;-) ;-)

- James Snell
     IBM Emerging Technologies
     jasnell@us.ibm.com
     (559) 587-1233 (office)
     (700) 544-9035 (t/l)
     Programming Web Services With SOAP
         O'Reilly & Associates, ISBN 0596000952

     Have I not commanded you? Be strong and courageous. 
     Do not be terrified, do not be discouraged, for the Lord your 
     God will be with you whereever you go.    - Joshua 1:9



bugzilla@apache.org
02/17/2003 05:15 PM
Please respond to axis-dev


To
axis-dev@ws.apache.org
cc

bcc

Subject
DO NOT REPLY [Bug 16844]  -     MapDeserializer creates only HashMaps, 
throwing ClassCastException when assigning



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=16844>.
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=16844

MapDeserializer creates only HashMaps, throwing ClassCastException when 
assigning





------- Additional Comments From gdaniels@macromedia.com  2003-02-18 01:15 
-------
Actually, I think this might be easily fixable as follows: just think 
about
the deserialization side, which is the problem.  We're creating a HashMap 
in
the deserializer, then trying to assign it to some field (either a bean 
field
or a parameter) with a different type of Map type - is that accurate?

If so I believe all we need to do here is make convert() able to convert
HashMaps into arbitrary Maps as long as those Map-implementing classes 
have no-
argument constructors:

if (arg is a HashMap AND destClass implements Map) {
Map newMap = (Map)destClass.newInstance();
...iterate over HashMap plugging values into newMap...
}

If this would in fact solve the problem and anyone (Jim? :)) wants to do 
this,
go for it.


Mime
View raw message