You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by an...@locus.apache.org on 2000/02/04 21:46:15 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/dom DeferredDocumentImpl.java

andyc       00/02/04 12:46:15

  Modified:    java/src/org/apache/xerces/dom DeferredDocumentImpl.java
  Log:
  Off by 1 error in the DeferredDocumentImpl caused an
  ArrayIndexOutOfBoundsException to occur if the number
  of identifiers was equal to the size of the identifier
  index array.
  
  This problem was reported by Karen Schuchardt
  <kl...@pnl.gov> and resolved with the help
  (and persistence) of George Joseph <gt...@peakin.com>.
  
  Revision  Changes    Path
  1.7       +1 -1      xml-xerces/java/src/org/apache/xerces/dom/DeferredDocumentImpl.java
  
  Index: DeferredDocumentImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DeferredDocumentImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DeferredDocumentImpl.java	2000/01/14 02:47:04	1.6
  +++ DeferredDocumentImpl.java	2000/02/04 20:46:15	1.7
  @@ -816,7 +816,7 @@
                   // check to see if this element needs to be
                   // registered for its ID attributes
                   if (fIdElement != null) {
  -                    int idIndex = DeferredDocumentImpl.binarySearch(fIdElement, 0, fIdCount, nodeIndex);
  +                    int idIndex = DeferredDocumentImpl.binarySearch(fIdElement, 0, fIdCount - 1, nodeIndex);
                       while (idIndex != -1) {
   
                           if (DEBUG_IDS) {