Bug 45889

Summary: getShapes() brings error if count of table rows = 1
Product: POI Reporter: Constantin <cvolozhin>
Component: HSLFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P1    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Constantin 2008-09-25 05:10:04 UTC
current trunk code.

test snippet:

        SlideShow ppt = new SlideShow();
        Slide slide = ppt.createSlide();

        slide.addShape(new Table(1, 5));
        
        Shape[] shapes = slide.getShapes();


error:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
	at org.apache.poi.hslf.model.Table.initTable(Table.java:180)
	at org.apache.poi.hslf.model.Table.setSheet(Table.java:193)
	at org.apache.poi.hslf.model.Sheet.getShapes(Sheet.java:229)
	at JustPOI.main(JustPOI.java:33)
Comment 1 Yegor Kozlov 2008-10-02 22:27:28 UTC
Fixed in r701302.

Yegor