Summary: | Incorrect assert in SXSSFSheet#getSXSSFSheet(XSSFSheet) | ||
---|---|---|---|
Product: | POI | Reporter: | Mark Harris <mark.harris> |
Component: | SXSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | minor | ||
Priority: | P2 | ||
Version: | 3.8-dev | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: | Removes an assert from SXSSFWorkbook.java |
Created attachment 27430 [details] Removes an assert from SXSSFWorkbook.java Workbook#getSheet(String) explicitly states that it should return null if workbook does not contain a sheet with the name given. In 3.8-beta3 and the trunk, SXSSFWorkbooks implementation of getSheet(String) calls getSXSSFSheet(XSFFSheet), which contains an assert (:68 in 3.8-beta3) that the result of a Map lookup on the string isn't null. This makes getSheet(String) no good for an existence check on a named sheet if the JVM has been run with -ea. I've attached a patch that removes the assert from the current trunk.