You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jochen Wiedmann (Jira)" <ji...@apache.org> on 2019/12/02 20:09:00 UTC

[jira] [Commented] (IO-641) NPE in org.apache.commons.io.IOUtils.contentEquals(Reader, Reader) when only one input is null

    [ https://issues.apache.org/jira/browse/IO-641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16986326#comment-16986326 ] 

Jochen Wiedmann commented on IO-641:
------------------------------------

Why do you consider this a bug? Throwing an NPE, if either parameter is null, makes perfect sense to me. What else should the method do?

 

Besides, that behaviour is even documented. Quoting the

 

[Javadoc API|[https://commons.apache.org/proper/commons-io/javadocs/api-release/index.html]]

 

Throws:{{[NullPointerException|http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true]}} - if either input is null

 

> NPE in org.apache.commons.io.IOUtils.contentEquals(Reader, Reader) when only one input is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: IO-641
>                 URL: https://issues.apache.org/jira/browse/IO-641
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Gary D. Gregory
>            Assignee: Gary D. Gregory
>            Priority: Major
>             Fix For: 2.7
>
>
> NPE in org.apache.commons.io.IOUtils.contentEquals(Reader, Reader) when only one input is null



--
This message was sent by Atlassian Jira
(v8.3.4#803005)