[
https://issues.apache.org/jira/browse/METRON-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15733403#comment-15733403
]
ASF GitHub Bot commented on METRON-618:
---------------------------------------
Github user justinleet commented on the issue:
https://github.com/apache/incubator-metron/pull/391
Cleaned up most of the warnings that come from the compiler in
metron-analytics. What's left is a couple Error Prone issues (primarily
related to Charset, which has a separate ticket), and multiline annotations is
tied to Java 6 (and not something we can much do about, nor am I worried about
given that it still works).
- For the `toArgs()` methods, swapped out the `Utils` class for
`Arrays.asList()`. This itself is `@SafeVarargs`, and since we just iterate
over it, out methods themselves should be fine as `@SafeVarargs`.
- Said `Utils` class is deleted entirely now.
- Variety of `@SuppressWarnings("unchecked")` added. These are typically
things derived from JSONObject or similar, because the JSON library we use only
has raw types. I tried to keep these at the minimum scope I could.
- Couple of instances of code get generics applied to them appropriately,
including one that was previously flagged to suppress raw types (once a couple
other things that were warnings got fixed with types, that could carry through)
Tested this by spinning up quickdev and running up MaaS and the profiler
and making sure output came through both of them.
> Eliminate Javac Warnings in metron-analytics
> --------------------------------------------
>
> Key: METRON-618
> URL: https://issues.apache.org/jira/browse/METRON-618
> Project: Metron
> Issue Type: Sub-task
> Affects Versions: 0.3.0
> Reporter: Justin Leet
> Assignee: Justin Leet
> Priority: Minor
>
> Kill off the java compiler warnings in maas project, as much as possible.
> Most of these are related to missing @SuppressWarnings("unchecked") on code
> that either should have them, or be refactored so it's not necessary.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)