[
https://issues.apache.org/jira/browse/PDFBOX-2783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14523115#comment-14523115
]
ASF subversion and git services commented on PDFBOX-2783:
---------------------------------------------------------
Commit 1677120 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1677120 ]
PDFBOX-2783: Use getCOSObject() instead of getCOSDictionary()
> 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
>
> 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]