Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
1657 | major | always | 03-28-07 02:12 | 06-05-07 11:44 | |
|
|||||
Reporter: | dbrakhane | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.0.20 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.1.2 | ||
|
|||||
Summary: | 0001657: Hessian 3.0.20 can't handle Singleton(Map)s | ||||
Description: |
I recently tried upgrading from (the Java) Hessianlib 3.0.8 to 3.0.20 because the latter supports enums. However, it seems like 3.0.20 (in contrast to 3.0.8) can't handle Maps that are an instance of Collections.singletonMap: Caused by: com.caucho.hessian.io.IOExceptionWrapper: java.lang.InstantiationException: java.util.Collections$SingletonMap at com.caucho.hessian.io.MapDeserializer.readMap(MapDeserializer.java) at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java) at com.caucho.hessian.io.HessianInput.readReply(HessianInput.java:285) at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java) The problem seems to be that MapDeserializer - as long as the class is not Map.class or SortedMap.class, tries to instanciate a new object of the given type. However, Collections$SingletonMap cannot be instanciated. I think, modifiying MapDeserializer (and ListDeserializer) so that it, when it cannot instanciate the original type, instanciates an object of HashMap (or ArrayList, respectively) instead, should fix the problem |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|