Bug 24519 - getCustomPalette() on newly created HSSFWorkbook crashes
Summary: getCustomPalette() on newly created HSSFWorkbook crashes
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-dev
Hardware: All All
: P3 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-08 03:36 UTC by Stefan Proels
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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