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 42799] New: - Array out of bound exception in ListTables public ListLevel getLevel(int listID, int level)
Date Tue, 03 Jul 2007 09:06:47 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=42799>.
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=42799

           Summary: Array out of bound exception in ListTables public
                    ListLevel getLevel(int listID, int level)
           Product: POI
           Version: 3.0-dev
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HWPF
        AssignedTo: dev@poi.apache.org
        ReportedBy: robert.pastor@thalesatm.com


package org.apache.poi.hwpf.model;
public class ListTables
When the "level" index is greater to the lst.numLevels() we got an array out of 
bound exception:
Proposed change is :
public ListLevel getLevel(int listID, int level)
  {
    ListData lst = (ListData)_listMap.get(new Integer(listID));
    if (level < lst.numLevels()) {
    	ListLevel lvl = lst.getLevels()[level];
    	return lvl;
    }
    else {
    	return null;
    }
  }

-- 
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message