You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2004/07/20 04:30:16 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/xinclude XIncludeNamespaceSupport.java
mrglavas 2004/07/19 19:30:16
Modified: java/src/org/apache/xerces/xinclude
XIncludeNamespaceSupport.java
Log:
Fixing an AIOOBE which may occur when an xi:include
element appears as the top-level document element.
Since no members of the array were marked as valid
we were running off the front of the array. Now, if
we reach the root we always stop.
Revision Changes Path
1.6 +2 -2 xml-xerces/java/src/org/apache/xerces/xinclude/XIncludeNamespaceSupport.java
Index: XIncludeNamespaceSupport.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xinclude/XIncludeNamespaceSupport.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XIncludeNamespaceSupport.java 24 Feb 2004 23:15:52 -0000 1.5
+++ XIncludeNamespaceSupport.java 20 Jul 2004 02:30:16 -0000 1.6
@@ -84,7 +84,7 @@
*/
public String getURIFromIncludeParent(String prefix) {
int lastValidContext = fCurrentContext - 1;
- while (!fValidContext[lastValidContext]) {
+ while (lastValidContext > 0 && !fValidContext[lastValidContext]) {
lastValidContext--;
}
return getURI(prefix, lastValidContext);
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org