You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Stefan Ziegler (Jira)" <ji...@apache.org> on 2022/10/07 10:15:00 UTC

[jira] [Created] (PDFBOX-5523) Big in org/apache/pdfbox/multipdf/Overlay#overlay(specificPageOverlayFile)

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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org