You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "simon steiner (JIRA)" <ji...@apache.org> on 2017/03/17 10:07:41 UTC

[jira] [Updated] (FOP-1615) NPE in InlineStackingLayoutManager when hyphenate without break opportunity

     [ https://issues.apache.org/jira/browse/FOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

simon steiner updated FOP-1615:
-------------------------------
    Priority: Major  (was: Blocker)

> NPE in InlineStackingLayoutManager when hyphenate without break opportunity
> ---------------------------------------------------------------------------
>
>                 Key: FOP-1615
>                 URL: https://issues.apache.org/jira/browse/FOP-1615
>             Project: FOP
>          Issue Type: Bug
>          Components: layout/inline
>    Affects Versions: 0.95
>         Environment: Operating System: Linux
> Platform: PC
>            Reporter: Carsten Metzler
>         Attachments: mantis779.fo, module.fo.gz
>
>
> In the org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager an NullPointerException is thrown in the "applyChanges"-method, when the variables prevLM AND currLM both are null.
> line 333-338: 
>             currLM = (InlineLevelLayoutManager) oldElement.getLayoutManager();
>             // initialize prevLM
>             if (prevLM == null) {
>                 prevLM = currLM;
>             }
> The getLayoutManager-method of the ListElement-class returns null when no position is set, so currLM is null. If prevLM is null, too, prevLM is set to currLM - so both are null. In the following code the applyChanges-method is called on prevLM without null-check.
> As workaround I inserted the following code after line 338:
>             if(prevLM == null && currLM == null) {
>             	continue;
>             }



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)