|Summary:||Incorrect assert in SXSSFSheet#getSXSSFSheet(XSSFSheet)|
|Product:||POI||Reporter:||Mark Harris <mark.harris>|
|Component:||SXSSF||Assignee:||POI Developers List <dev>|
|Attachments:||Removes an assert from SXSSFWorkbook.java|
Description Mark Harris 2011-08-24 10:42:34 UTC
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.