Bug 55923

Summary: [PATCH] Xml data export leads to a NPE when sorting output data
Product: POI Reporter: Marc <hae>
Component: XSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.9-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: [PATCH] fixes the mentioned problem
[PATCH] fixes the mentioned problem
[PATCH] fixes the mentioned problem
[PATCH] fixes the mentioned problem

Description Marc 2013-12-23 10:22:46 UTC
The class XSSFExportToXml fails when comparing two similiar xPaths. It continous comparing the xPath nodes after the last common node which then leads to a null pointer exception.


Given to xPaths:

1. A/B/C/E
2. A/B/D/E

Expected behaviour: Iterating up to node B. Testing if C or D appears first in the schema xml.

Actual beahviour: It continous comparing node E after node C/D whichs then leads to a NPE.

I'm going to provide a patch for this issue.
Comment 1 Marc 2013-12-23 11:37:49 UTC
Created attachment 31141 [details]
[PATCH] fixes the mentioned problem

including an unit test
Comment 2 Marc 2013-12-23 11:47:48 UTC
Created attachment 31142 [details]
[PATCH] fixes the mentioned problem

- I had to submit the patch again, because bugzilla didn't detected the file type correctly
- Patch includes an unit test which proves the problem
Comment 3 Marc 2013-12-23 11:51:47 UTC
Created attachment 31143 [details]
[PATCH] fixes the mentioned problem
Comment 4 Marc 2013-12-23 13:48:22 UTC
Created attachment 31144 [details]
[PATCH] fixes the mentioned problem

- Renamed the excel test file to match bugzilla number (55923)
Comment 5 Dominik Stadler 2014-02-03 20:57:34 UTC
This is now also applied to trunk (post 3.10!) via r1564050, thanks again for all the nicely built patches.