[
https://issues.apache.org/jira/browse/PDFBOX-2783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr resolved PDFBOX-2783.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
> Remove getCOSDictionary() method, adjust getCOSObject() return type
> -------------------------------------------------------------------
>
> Key: PDFBOX-2783
> URL: https://issues.apache.org/jira/browse/PDFBOX-2783
> Project: PDFBox
> Issue Type: Sub-task
> Affects Versions: 2.0.0
> Reporter: Tilman Hausherr
> Fix For: 2.0.0
>
>
> As discussed on the mailing list: Remove getCOSDictionary(), use
> getCOSObject() instead, change return type to COSDictionary or whatever is
> applicable. If possible, change javadoc too.
> While working on it, I noticed code like this:
> {code}
> if (newDomain == null)
> {
> getCOSDictionary().removeItem(COSName.DOMAIN);
> }
> else
> {
> getCOSDictionary().setItem(COSName.DOMAIN, newDomain);
> }
> {code}
> this should be replaced with
> {code}
> getCOSObject().setItem(COSName.DOMAIN, newDomain);
> {code}
> because setItem() calls removeItem() when the second parameter is nulll.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]