[
https://issues.apache.org/jira/browse/METRON-612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15725463#comment-15725463
]
Justin Leet commented on METRON-612:
------------------------------------
We have a (very) large number of warnings of the form
{code}
/home/travis/build/justinleet/incubator-metron/metron-analytics/metron-maas-common/src/main/java/org/apache/metron/maas/util/RESTUtil.java:64:
warning: [DefaultCharset] Implicit use of the platform default charset, which
can result in e.g. non-ASCII characters being silently replaced with '?' in
many environments
return new BufferedReader(new
InputStreamReader(response.getEntity().getContent()))
^
(see http://errorprone.info/bugpattern/DefaultCharset)
Did you mean 'return new BufferedReader(new
InputStreamReader(response.getEntity().getContent(), UTF_8))' or 'return new
BufferedReader(new InputStreamReader(response.getEntity().getContent(),
Charset.defaultCharset()))'?
{code}
See http://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html for
standard Charsets.
Given that the default Charset is platform dependent, we should at least
consider making a conscious choice on this. If we don't want to make a
decision, it is also possible to set this warning to ignore, but I'm not
generally a fan of doing that for warnings.
Does anybody with more knowledge / expertise have any input on this?
> Clean up Error Prone generated warnings
> ---------------------------------------
>
> Key: METRON-612
> URL: https://issues.apache.org/jira/browse/METRON-612
> Project: Metron
> Issue Type: Bug
> Affects Versions: 0.3.0
> Reporter: Justin Leet
> Assignee: Justin Leet
> Priority: Minor
>
> As a result of METRON-593, we have a new set of warnings in our code that
> should be addressed. 593 already addressed errors (as those would break the
> build otherwise).
> These can be seen in the mvn compile output of the various modules. It
> includes things like missing Override annotations.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)