https://bz.apache.org/bugzilla/show_bug.cgi?id=65291

            Bug ID: 65291
           Summary: XWPFRun method getStyle() throws an
                    ArrayOutOfBoundsException
           Product: POI
           Version: 5.0.0-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XWPF
          Assignee: dev@poi.apache.org
          Reporter: mark.gl...@gmail.com
  Target Milestone: ---

The problem is in the 'public String getStyle()' method. The line 'CTString
style = pr.getRStyleArray(0)' produces the exception. It would be better to
test with 
if (pr.getRStyleArray().length == 0) {
   return "";
}

CTString style = pr.getRStyleArray(0);
if (style == null ) {
   return "";
} else {
   return style;
}

I'm assuming that pr.getRStyleArray(0) can return null.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to