ArrayListExtension Implementation
---------------------------------

         Key: AXIS-1770
         URL: http://issues.apache.org/jira/browse/AXIS-1770
     Project: Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: current (nightly)    
    Reporter: nishant kumar


In the ArrayDeserializer class there is an inner class ArrayListExtension.

In the second constructor of this class, the one which takes length as
parameter, why do we create such a large array when the array we
normally use is of very small size. why don't we create an array of size
length. Are we not wasting memory here?

here is another problem that may lead to a bug somewhere.
In both the constructor of the ArrayListExtension, one sets the 
passed arrayClass = null based on some condition instead of setting
the instance variable.

should it not be 

            if (arrayClass == null ||
                arrayClass.isInterface() ||
                java.lang.reflect.Modifier.isAbstract(
                    arrayClass.getModifiers())) {
                this.arrayClass = null;
            } 

instead of

            if (arrayClass == null ||
                arrayClass.isInterface() ||
                java.lang.reflect.Modifier.isAbstract(
                    arrayClass.getModifiers())) {
                arrayClass = null;
            } 


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to