You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2015/11/09 16:11:11 UTC

[jira] [Resolved] (IO-486) FileUtils.readFileToString() can immediately return empty string if file length is zero

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

Sebb resolved IO-486.
---------------------
    Resolution: Won't Fix

> FileUtils.readFileToString() can immediately return empty string if file length is zero
> ---------------------------------------------------------------------------------------
>
>                 Key: IO-486
>                 URL: https://issues.apache.org/jira/browse/IO-486
>             Project: Commons IO
>          Issue Type: Improvement
>            Reporter: Viktor Isaev
>
> If {{file.length() == 0}}, there is no point of doing extra work of opening and closing an input stream - we can return an empty string right away.
> Same applies for {{FileUtils.readFileToByteArray()}} and {{FileUtils.readLines()}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)