pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johannes Koch (JIRA)" <j...@apache.org>
Subject [jira] Closed: (PDFBOX-628) Too many detours in COSDictionary convenience methods
Date Mon, 08 Mar 2010 08:57:27 GMT

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

Johannes Koch closed PDFBOX-628.
--------------------------------


Thanks

> Too many detours in COSDictionary convenience methods
> -----------------------------------------------------
>
>                 Key: PDFBOX-628
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-628
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>            Reporter: Johannes Koch
>            Priority: Minor
>             Fix For: 1.1.0
>
>         Attachments: PDFBox-628_patch_00.txt
>
>
> I think there are too many detours in some of the COSDictionary convenience methods.
E.g.
> getInt( COSName key )
> -> getInt( COSName key, int defaultValue )
>    // create String from COSName
> -> getInt( String key, int defaultValue )
> -> getInt( String[] keyList, int defaultValue )
> -> getDictionaryObject( String[] keyList )
>    // create COSName from String
> -> getDictionaryObject( COSName key )
> Wouldn't it be easier to just do the following?
> getInt( COSName key )
> -> getDictionaryObject( COSName key )
> Same with getLong(COSName):
> getLong( COSName key )
> -> getLong( COSName key, long defaultValue )
> -> getLong( String key, long defaultValue )
> -> getLong( String[] keyList, long defaultValue )
> -> getDictionaryObject( String[] keyList )
> -> getDictionaryObject( COSName key )
> This could be reduced to:
> getLong( COSName key )
> -> getDictionaryObject( COSName key )
> getFloat(COSName) has only one detour:
> getFloat( COSName key )
> -> getFloat( COSName key, float defaultValue )
> -> getDictionaryObject( COSName key )
> This could be reduced to:
> getFloat( COSName key )
> -> getDictionaryObject( COSName key )

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message