xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46386] New: NullPointerException in InlineStackingLayoutManager
Date Fri, 12 Dec 2008 14:27:52 GMT

           Summary: NullPointerException in InlineStackingLayoutManager
           Product: Fop
           Version: 0.95
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: page-master/layout
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: carsten.metzler@l-bank.de

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) {

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

View raw message