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:00:03 UTC

[jira] [Commented] (IO-643) NPE in org.apache.commons.io.FileUtils.contentEquals(File, File) when only one input is null

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

Jochen Wiedmann commented on IO-643:
------------------------------------

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.FileUtils.contentEquals(File, File) when only one input is null
> --------------------------------------------------------------------------------------------
>
>                 Key: IO-643
>                 URL: https://issues.apache.org/jira/browse/IO-643
>             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)