https://issues.apache.org/bugzilla/show_bug.cgi?id=51052

           Summary: NullPointerException with retrieve marker
           Product: Fop
           Version: all
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: page-master/layout
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: med1...@gmail.com


Created an attachment (id=26875)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26875)
NullPointerException 

The issue is that a NPE is thrown when a retrieve-marker retrieves a marker
with only text content, when the retrieve-marker is a child of a table-cell.
The real problem here is that there is no validation done on the retrieve
marker to ensure that the markers child is a valid child of the retrieve
markers parent (excuse the tongue twister), see XSL section 6.13.5:

"An fo:marker may contain any formatting objects that are permitted as a
replacement of any fo:retrieve-marker or fo:retrieve-table-marker that
retrieves the fo:marker's children."

Though the spec doesn't specify how to handle this error, I am proposing that
rather than throw an NPE, FOP logs a warning and ignores the marker. The spec
doesn't specifically suggest that this kind of error is recoverable, but others
might agree that throwing an NPE isn't the "proper" way to deal with this
error.

I've attached an example test FO and I'll attach a patch shortly.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to