You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2022/10/08 02:04:00 UTC
[jira] [Commented] (PDFBOX-5523) Big in org/apache/pdfbox/multipdf/Overlay#overlay(specificPageOverlayFile)
[ https://issues.apache.org/jira/browse/PDFBOX-5523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17614315#comment-17614315 ]
Tilman Hausherr commented on PDFBOX-5523:
-----------------------------------------
Ouch, this happened in r1901328.
> 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
> Priority: Critical
> Labels: regression
>
> {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