Menu

#3 arrays not working with JOXBeanInput

open
nobody
None
5
2003-07-24
2003-07-24
Anonymous
No

from ebdon_99@yahoo.com

In JOXBeanInput:

Object[] obValues = (Object[]) Array.newInstance(
desc.getPropertyType(), arrayBuild.size());

at readProperty, line 255
is incorrect. For object []'s that should be:

Object[] obValues = (Object[]) Array.newInstance(
desc.getPropertyType().getComponentType
(), arrayBuild.size());

then there also needs to be special handling for primitive
type arrays.

The current code erroneously adds an array dimension.

JOXSAXBeanInput works correctly, BTW.

Thanks!

Discussion

  • jamieweb

    jamieweb - 2004-04-01

    Logged In: YES
    user_id=1011119

    It is very important question. My program can't run.

     
  • jamieweb

    jamieweb - 2004-04-01

    Logged In: YES
    user_id=1011119

    Need i supply example code?

     

Log in to post a comment.

MongoDB Logo MongoDB