poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39595] New: - java.lang.IndexOutOfBoundsException: Index: 7, Size: 7
Date Tue, 16 May 2006 22:43:08 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39595>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39595

           Summary: java.lang.IndexOutOfBoundsException: Index: 7, Size: 7
           Product: POI
           Version: 3.0-dev
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: HWPF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: Xianing.Zhu@xerox.com


InputStream data = .....
HWPFDocument doc = new HWPFDocument(data)
StyleSheet styleSheet = doc.getStyleSheet();
Range r = doc.getRange();
int lenParagraph = r.numParagraphs();

Range.numParagraphs() throw: java.lang.IndexOutOfBoundsException: Index: 7, 
Size: 7

The problem was cased in CHPBinTable and PAPBinTable method: adjustForDelete
(..)
      chpx = (CHPX)_textRuns.get(endIndex);
      chpx.setEnd((chpx.getEnd() - endMark) + offset);
 The start did not be ajusted. When start is less than offset, it causes 
java.lang.IndexOutOfBoundsException.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Mime
View raw message