Mantis - Resin
Viewing Issue Advanced Details
94 minor always 04-11-05 00:00 05-11-05 00:00
user72  
 
high  
closed 3.0.12  
3.0.12 fixed  
none    
none 3.0.13  
0000094: cached deserializers are never used in SerializerFactory
RSN-85
In com.caucho.hessian.io.SerializerFactory.getDeserializer(String type), there is the following code:

if (_cachedTypeDeserializerMap != null)
  deserializer = (Deserializer) _cachedTypeDeserializerMap.get(type);

deserializer = (Deserializer) _typeMap.get(type);
if (deserializer != null) {
  return deserializer;
}

The deserializer returned from the cache is always overwritten by the one from _typeMap. Should be:

if (_cachedTypeDeserializerMap != null)
  deserializer = (Deserializer) _cachedTypeDeserializerMap.get(type);
if (deserializer == null)
  deserializer = (Deserializer) _typeMap.get(type);
if (deserializer != null) {
  return deserializer;
}
all

There are no notes attached to this issue.