Lines 2238-2241
Link Here
|
2238 |
// make sure we are still readable |
2238 |
// make sure we are still readable |
2239 |
writeOutAndReadBack(workbook); |
2239 |
writeOutAndReadBack(workbook); |
2240 |
} |
2240 |
} |
|
|
2241 |
|
2242 |
/** |
2243 |
* Test case for bug #50083. |
2244 |
* If bug is present, test case throws an IllegalArgumentException |
2245 |
* on workbook serialization. |
2246 |
*/ |
2247 |
public void test50083() { |
2248 |
HSSFWorkbook workbook = new HSSFWorkbook(); |
2249 |
Sheet sheet0 = workbook.createSheet("Sheet_00"); |
2250 |
|
2251 |
Sheet sheet1 = workbook.createSheet("Sheet_1"); |
2252 |
|
2253 |
//Breaks propper sheet order here. |
2254 |
workbook.setSheetOrder(sheet1.getSheetName(), 0); |
2255 |
|
2256 |
//Deletes wrong sheet record due to the wrong reordering above. |
2257 |
workbook.removeSheetAt(0); |
2258 |
|
2259 |
//Exception gets thrown here because of incorrect data is supplied |
2260 |
//when calculating output buffer size on workbook serialization. |
2261 |
writeOutAndReadBack(workbook); |
2262 |
} |
2241 |
} |
2263 |
} |