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

Uwe Schindler commented on LUCENE-5560:
---------------------------------------

Use Lucene's {{IOUtils.UTF_8}} for that use-case (see javadocs). This one uses 
the above method and provides the shortcut constant as {{String}}. The commit 
does this partially. Although I did not rewrite all instances of the UTF-8 
string, there are still many of them in tests (which does not hurt).

This also applies to commons-io stuff. But we should nuke commons-io in later 
issues! commons-io is mostly useless with later Java versions. And it has 
partially unmaintained, horrible methods which violate lots of standards 
(auto-closing, default charsets,...).

> Cleanup charset handling for Java 7
> -----------------------------------
>
>                 Key: LUCENE-5560
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5560
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 4.8, 5.0
>
>         Attachments: LUCENE-5560.patch, LUCENE-5560.patch, LUCENE-5560.patch, 
> LUCENE-5560.patch, LUCENE-5560.patch
>
>
> As we are now on Java 7, we should cleanup our charset handling to use the 
> official constants added by Java 7: {{StandardCharsets}}
> This issue is just a small code refactoring, trying to nuke the IOUtils 
> constants and replace them with the official ones provided by Java 7.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to