commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gentle Fabien (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IMAGING-131) PngImageParser#getBufferedImage() doesn't respect ImageParser specification
Date Sun, 25 May 2014 11:14:01 GMT
Gentle Fabien created IMAGING-131:
-------------------------------------

             Summary: PngImageParser#getBufferedImage() doesn't respect ImageParser specification

                 Key: IMAGING-131
                 URL: https://issues.apache.org/jira/browse/IMAGING-131
             Project: Commons Imaging
          Issue Type: Bug
          Components: Format: PNG
    Affects Versions: 1.0
            Reporter: Gentle Fabien
            Priority: Critical


ImageParser#getBufferedImage() specification tell in documentation :

{code:title=ImageParser#getBufferedImage()|borderStyle=solid}
/**
   ...
     * @param params     Optional instructions for special-handling or
     *                   interpretation of the input data (null objects are permitted and
     *                   must be supported by implementations).
      ...
     **/
{code}

Implementation PngImageParser#getBufferedImage() does note respect this documentation. Indeed,
first line of the function is : 

{code:title=PngImageParser#getBufferedImage() line 637 |borderStyle=solid}
if (params.containsKey(PARAM_KEY_VERBOSE)) {
            params.remove(PARAM_KEY_VERBOSE);
        }
{code}

I suppose It would be 

{code:title=FIX PngImageParser#getBufferedImage()|borderStyle=solid}
if (params!=null && params.containsKey(PARAM_KEY_VERBOSE)) {
            params.remove(PARAM_KEY_VERBOSE);
        }
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message