Bug 58350 - [PATCH] Make (S)XSSFSheet behavior the same as HSSFSheet when calling getMergedRegions
Summary: [PATCH] Make (S)XSSFSheet behavior the same as HSSFSheet when calling getMerg...
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Keywords: PatchAvailable
Depends on: 57893
Blocks: 58348 58443 58485
  Show dependency tree
Reported: 2015-09-10 02:32 UTC by Javen O'Neal
Modified: 2015-10-06 21:23 UTC (History)
0 users

XSSFSheet.getMergedRegions return empty list (1.19 KB, patch)
2015-09-10 02:32 UTC, Javen O'Neal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Javen O'Neal 2015-09-10 02:32:42 UTC
Created attachment 33086 [details]
XSSFSheet.getMergedRegions return empty list

From bug 57893 comment 7:

r1690661 makes the behavior of XSSFSheet and SXSSFSheet inconsistent with HSSFSheet if the worksheet does not have a merged regions container, raising an IllegalStateException if the sheet is missing a merged regions container.

The attached patch makes XSSFSheet/SXSSFSheet behave the same as HSSFSheet by returning an empty list when getMergedRegions is called. This is consistent with XSSFSheet.getNumMergedRegions -> returns 0 if worksheet.getMergeCells() is null.
Comment 1 David North 2015-09-23 12:53:35 UTC
Fixed on trunk in r1704839, thanks for the patch.
Comment 2 Javen O'Neal 2015-10-06 21:16:57 UTC
This change was committed after 3.13-FINAL. This change will be included in 3.14-dev.