[
https://issues.apache.org/jira/browse/PDFBOX-6312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18147091#comment-18147091
]
ASF subversion and git services commented on PDFBOX-6312:
---------------------------------------------------------
Commit 1940459 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1940459 ]
PDFBOX-6312: pass value, as suggested by Martin Mirchev
> PDMarkInfo.setSuspect() ignores its parameter and always writes false
> ---------------------------------------------------------------------
>
> Key: PDFBOX-6312
> URL: https://issues.apache.org/jira/browse/PDFBOX-6312
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 3.0.8 PDFBox, 4.0.0
> Reporter: Martin Mirchev
> Priority: Major
>
> {{PDMarkInfo.setSuspect(boolean)}} always stores {{false}}, whatever value is
> passed:
> {code:java}
> public void setSuspect( boolean suspect )
> {
> dictionary.setBoolean( "Suspects", false );
> }
> {code}
> So {{/Suspects true}} can never be written through the API:
> {code:java}
> PDMarkInfo mi = new PDMarkInfo();
> mi.setSuspect(true);
> mi.isSuspect(); // false
> mi.getCOSObject(); // COSDictionary{COSName{Suspects}:false;}
> {code}
> Checked on trunk (bd0c9c0); the same line is on the 3.0 and 2.0 branches. The
> fix is to pass the parameter: {{dictionary.setBoolean( "Suspects", suspect
> );}}. (PDFBOX-6276 fixed a different misuse of {{setSuspect}} in
> {{mergeMarkInfo}}.)
> This issue was found by an LLM-assisted tool and verified manually.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]