[ 
https://issues.apache.org/jira/browse/PDFBOX-6312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr resolved PDFBOX-6312.
-------------------------------------
    Fix Version/s: 2.0.38
                   3.0.9 PDFBox
                   4.0.0
         Assignee: Tilman Hausherr
       Resolution: Fixed

Thank you. This looks like a copy and paste error, even predates its beginning 
as an Apache project.

> 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: 2.0.37, 3.0.8 PDFBox, 4.0.0
>            Reporter: Martin Mirchev
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 2.0.38, 3.0.9 PDFBox, 4.0.0
>
>
> {{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]

Reply via email to