hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Kanter (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-4366) Fix Lint Warnings in YARN Common
Date Wed, 13 Apr 2016 00:32:25 GMT

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

Robert Kanter commented on YARN-4366:
-------------------------------------

We should verify that this doesn't break anything.  As explained in [this StackOverflow|http://stackoverflow.com/questions/5401537/i-have-got-this-warning-non-varargs-call-of-varargs-method-with-inexact-argumen],
there's a difference between something like {{cls.getMethod(action, null);}} and something
like {{cls.getMethod(action);}}.  The latter constructs an empty array while the former is
ambiguous if it passes a single {{null}} instance or an array with a single {{null}} element
(hence the warning).

Unfortunately, besides being reflection, the code is very generic, so it's not straightforward
to track down what it's being called on and what those expect here.

> Fix Lint Warnings in YARN Common
> --------------------------------
>
>                 Key: YARN-4366
>                 URL: https://issues.apache.org/jira/browse/YARN-4366
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: yarn
>    Affects Versions: 2.7.1
>            Reporter: Daniel Templeton
>            Assignee: Daniel Templeton
>         Attachments: YARN-4366.001.patch
>
>
> {noformat}
> [WARNING] /Users/daniel/NetBeansProjects/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/Router.java:[100,45]
non-varargs call of varargs method with inexact argument type for last parameter;
>   cast to java.lang.Class<?> for a varargs call
>   cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning
> [WARNING] /Users/daniel/NetBeansProjects/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java:[62,46]
non-varargs call of varargs method with inexact argument type for last parameter;
>   cast to java.lang.Class<?> for a varargs call
>   cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning
> [WARNING] /Users/daniel/NetBeansProjects/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java:[64,34]
non-varargs call of varargs method with inexact argument type for last parameter;
>   cast to java.lang.Object for a varargs call
>   cast to java.lang.Object[] for a non-varargs call and to suppress this warning
> {noformat}



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

Mime
View raw message