[ 
https://issues.apache.org/jira/browse/FOP-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18011471#comment-18011471
 ] 

Joao Goncalves commented on FOP-1924:
-------------------------------------

The fo no longer throws a NPE

> NullPointerException with retrieve marker
> -----------------------------------------
>
>                 Key: FOP-1924
>                 URL: https://issues.apache.org/jira/browse/FOP-1924
>             Project: FOP
>          Issue Type: Bug
>          Components: layout/unqualified
>    Affects Versions: 2.5
>         Environment: Operating System: Linux
> Platform: PC
>            Reporter: Mehdi Houshmand
>         Attachments: bug.fo
>
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to