Stefan Ziegler created PDFBOX-5523:
--------------------------------------

             Summary: Big in 
org/apache/pdfbox/multipdf/Overlay#overlay(specificPageOverlayFile)
                 Key: PDFBOX-5523
                 URL: https://issues.apache.org/jira/browse/PDFBOX-5523
             Project: PDFBox
          Issue Type: Bug
    Affects Versions: 2.0.27, 3.0.0 PDFBox
            Reporter: Stefan Ziegler


{code:java}
path = e.getValue();
LayoutPage layoutPage = layouts.get(path);
if (layoutPage == null)
{
    PDDocument doc = loadPDF(path);
    layouts.put(path, getLayoutPage(doc));
    openDocuments.add(doc);
}
specificPageOverlayPage.put(e.getKey(), layoutPage);{code}
layoutPage is null because never assigned within the if clause. It should be:
{code:java}
path = e.getValue();
LayoutPage layoutPage = layouts.get(path);
if (layoutPage == null)
{
    PDDocument doc = loadPDF(path);
    openDocuments.add(doc);
    layoutPage = getLayoutPage(doc);
    layouts.put(path, layoutPage);
}
specificPageOverlayPage.put(e.getKey(), layoutPage);{code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to