You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Michael Sacket <ms...@gammastream.com> on 2012/09/05 18:54:06 UTC

Array length and sizeOf discrepancy

Good afternoon,

I'm having a strange issue new issue with an application that uses XMLBeans.  I have the following basic setup:


Resource -> Page

<resource>
	<page>
		<number>1</number>
		<content>xxxxx</content>
	</page>
	<page>
		<number>2</number>
		<content>xxxxx</content>
	</page>
	.....
</resource>

In this particular resource, there are 303 pages.  To get the total pages, I call:

resource.sizeOfPageArray()

I get: 303 (the correct value)

However, if I call:

resource.getPageArray().length

Which reports: 235 (incorrect)

Consequently, calling "resource.getPageArray(300)" throws an IndexOutOfBoundsException.

Any thoughts on what might be causing this?  The application was working fine; however it quit working when I upgraded Java  from 1.5 to 1.6.  It seems to work fine for smaller documents.

Thanks!
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org