Bug 24519

Summary: getCustomPalette() on newly created HSSFWorkbook crashes
Product: POI Reporter: Stefan Proels <stefan.proels>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: critical    
Priority: P3    
Version: 2.0-dev   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Stefan Proels 2003-11-08 03:36:33 UTC
Calling getCustomPalette() on a newly created HSSFWorkbook
throws an InternalError with POI 2.0 RC1.

It used to work fine with 2.0-pre3.

------------------------------------------------------------
import org.apache.poi.hssf.usermodel.*;

public class PaletteBug  {

  public static void main(String[] args) {
    HSSFWorkbook workbook = new HSSFWorkbook();
    System.out.println(workbook.getCustomPalette());
  }
}
------------------------------------------------------------

Exception in thread "main" java.lang.RuntimeException: InternalError: Expected
PaletteRecord but got a '[USESELFS]
    .flag            = 0
[/USESELFS]
'
        at org.apache.poi.hssf.model.Workbook.getCustomPalette(Workbook.java:2073)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.getCustomPalette(HSSFWorkbook.java:985)
        at PaletteBug.main(PaletteBug.java:7)
Comment 1 Jason Height 2003-11-09 21:15:56 UTC
This has been fixed in CVS, in both the HEAD and on the REL_2_BRANCH.

Looks like we will need another 2.0 RC at some stage. Glen & Avik can you
coordinate a new RC at some stage.

Jason