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 2018/07/02 09:05:00 UTC

[jira] [Commented] (IO-581) Potential issues with File.length()

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

Sebb commented on IO-581:
-------------------------

What do you suggest is done about this?

> Potential issues with File.length()
> -----------------------------------
>
>                 Key: IO-581
>                 URL: https://issues.apache.org/jira/browse/IO-581
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Roman Leventov
>            Priority: Major
>
> File.length() is called multiple times in the code of the project, some of them might be problematic due to the contract of this method: it silently returns 0 in case of any I/O error.
> Examples: FileUtils.readFileToByteArray(), FileUtils.sizeOf(), etc.
> Some uses of File.lastModified() might be problematic for similar reasons.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)