Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1615

NPE in InlineStackingLayoutManager when hyphenate without break opportunity

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.95
    • Fix Version/s: None
    • Component/s: layout/inline
    • Labels:
      None
    • Environment:
      Operating System: Linux
      Platform: PC
    • External issue ID:
      46386

      Description

      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; }

        Attachments

        1. module.fo.gz
          6 kB
          Stefan Kost
        2. mantis779.fo
          0.5 kB
          Pascal Sancho

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              carsten.metzler@l-bank.de Carsten Metzler
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: