Bug 57312 - XWPFRun.getUnderline() throws NullPointerException, when missing xml attribute "w:val"
Summary: XWPFRun.getUnderline() throws NullPointerException, when missing xml attribut...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: 3.11-dev
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-05 10:21 UTC by RafTrusz
Modified: 2014-12-19 14:32 UTC (History)
0 users



Attachments
Java code (1.53 KB, text/x-java)
2014-12-05 10:21 UTC, RafTrusz
Details
docx document (21.19 KB, application/octet-stream)
2014-12-05 10:22 UTC, RafTrusz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RafTrusz 2014-12-05 10:21:06 UTC
Created attachment 32261 [details]
Java code

XWPFRun.getUnderline() throws NullPointerException, when missing xml attribute "w:val" in "<w:rPr><w:u w:color="000000"/></w:rPr>".

I checked on 3.10-FINAL and 3.11-beta3. 
Docx is created on MS Word 2010 Profesional 14.0.7128.5000. 

Attachments: java source, docx document.
Comment 1 RafTrusz 2014-12-05 10:22:03 UTC
Created attachment 32262 [details]
docx document
Comment 2 Dominik Stadler 2014-12-19 14:32:36 UTC
Fixed via r456572, via an additional null-check, will be included in the release after 3.11. 

Now the NullPointerException is gone, however the returned underlines looked like one too many, not sure why, please report a separate bug if this is an issue for you.