Mantis - Hessian
Viewing Issue Advanced Details
3921 major always 02-27-10 21:03 02-27-10 21:09
aloksingh  
 
normal  
new 4.0.3  
open  
none    
none  
0003921: SerializerFactory doesn't return the correct deserializer
In the class SerializerFactory, loadDeserializer() methods skips the deserializer returned from _factories..

Here is the current code, note the line "deserializer = factory.getDeserializer(cl);"
The reference is not being returned from the method, and instead overwritten a couple of lines later.
[code]
protected Deserializer loadDeserializer(Class cl)
    throws HessianProtocolException
  {
    Deserializer deserializer = null;

    for (int i = 0;
         deserializer == null && _factories != null && i < _factories.size();
         i++) {
      AbstractSerializerFactory factory;
      factory = (AbstractSerializerFactory) _factories.get(i);

      deserializer = factory.getDeserializer(cl);
    }

    // XXX: need test
    deserializer = _contextFactory.getDeserializer(cl.getName());

    if (deserializer != null)
      return deserializer;

[/code]

Instead, it should be something like this
[code]
deserializer = factory.getDeserializer(cl);
if (deserializer != null)
      return deserializer;
    }
[/code]



Notes
(0004449)
aloksingh   
02-27-10 21:09   
Related to 3632