commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars W (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IO-509) FileUtils.readFileToString: null not usable for default encoding
Date Tue, 07 Jun 2016 10:37:20 GMT

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

Lars W commented on IO-509:
---------------------------

Is there a reason for deprecating the shorter version readFileToString(File)?
It's not mentioned in the release notes.

> FileUtils.readFileToString: null not usable for default encoding
> ----------------------------------------------------------------
>
>                 Key: IO-509
>                 URL: https://issues.apache.org/jira/browse/IO-509
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.5
>            Reporter: Lars W
>
> Since 2.5 FileUtils.readFileToString(File) is deprecated. readFileToString(File, Charset)
should be used instead.
> The javadoc of readFileToString(File, Charset) says that, if the charset is null, the
platform default charset will be used.
> But I cannot use readFileToString(File, null) to get that behaviour, since there also
is readFileToString(File, String), so that readFileToString(File, null) is ambiguous.



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

Mime
View raw message