You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Graham Hesselroth <gs...@hesselroth.org> on 2002/10/18 16:45:44 UTC

BeanSerializer code-read, potential bug.

	I was reading through the BeanSerializer class to try and get a better
understanding of how to write my own custom serializers and noticed
something that seems odd on line 316 of the current code.  The relevant
section looks like the following:

313:            // Get the property descriptors for the super class
314:            TypeDesc superTypeDesc =
TypeDesc.getTypeDescForClass(superClass);
315:            if (superTypeDesc != null) {
316:                superPd = typeDesc.getPropertyDescriptors();
317:            } else {
318:                superPd = BeanUtils.getPd(superClass, null);
319:            }

	It seems like it would make more sense for line 316 to use the
superTypeDesc when invoking getPropertyDescriptors() instead of typeDesc
which refers to the class being serialized.


Thanks,

Graham