You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by ji...@apache.org on 2004/05/16 00:17:56 UTC
[jira] Resolved: (XERCESJ-960) ArrayIndexOutOfBoundsException error
Message:
The following issue has been resolved as FIXED.
Resolver: Michael Glavassevich
Date: Sat, 15 May 2004 3:17 PM
Thanks for reporting. Fixed in CVS now.
Two new kinds of components (XSFacet & XSMultiValueFacet) were added to the XML Schema API some time ago, but the array in SchemaGrammar was't updated to reflect this change.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCESJ-960
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCESJ-960
Summary: ArrayIndexOutOfBoundsException error
Type: Bug
Status: Resolved
Priority: Major
Resolution: FIXED
Project: Xerces2-J
Components:
XML Schema API
Versions:
2.6.2
Assignee: Michael Glavassevich
Reporter: Chin-Tat Teo
Created: Thu, 13 May 2004 5:02 AM
Updated: Sat, 15 May 2004 3:17 PM
Description:
I have this exception
java.lang.ArrayIndexOutOfBoundsException: 15
at org.apache.xerces.impl.xs.SchemaGrammar.getComponents(Unknown Source)
at xs.QueryXS.traverse(QueryXS.java:323)
at xs.QueryXS.main(QueryXS.java:127)
What I am doing is as follows:
XSNamespaceItemList nsItemList = model.getNamespaceItems();
if (nsItemList != null)
XSNamespaceItem nsItem = nsItemList.item(0);
XSNamedMap nmap = nsItem.getComponents((short)
XSTypeDefinition.COMPLEX_TYPE);
-------
After examining the xerces source files, I notice the error occurs at
line 811 of org.apache.xerces.impl.xs.SchemaGrammar. It tries to check for GLOBAL_COMP with an index larger than the declared array.
public synchronized XSNamedMap getComponents(short objectType) {
if (objectType <= 0 || objectType > MAX_COMP_IDX ||
!GLOBAL_COMP[objectType]) {
return null;
}
...
Hope the information is helpful
---------------------------------------------------------------------
JIRA INFORMATION:
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
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org