Bug 57312

Summary: XWPFRun.getUnderline() throws NullPointerException, when missing xml attribute "w:val"
Product: POI Reporter: RafTrusz <rafal.truszewski>
Component: XWPFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.11-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Java code
docx document

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.