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

Akira Ajisaka edited comment on YARN-7924 at 2/13/18 6:06 AM:
--------------------------------------------------------------

For example, in the following code, {{Collections.EMPTY_SET}} can be replaced 
with {{Collections.emptySet()}} to avoid unchecked assignment.
{code:java}
public Set<String> getAllocationTags() {
  return Collections.EMPTY_SET;
}{code}


was (Author: ajisakaa):
In the following code, {{Collections.EMPTY_SET}} can be replaced with 
{{Collections.emptySet()}} to avoid unchecked assignment.
{code:java}
public Set<String> getAllocationTags() {
  return Collections.EMPTY_SET;
}{code}

> Replace Collections.EMPTY_SET and EMPTY_MAP with emptySet() and emptyMap() 
> when available
> -----------------------------------------------------------------------------------------
>
>                 Key: YARN-7924
>                 URL: https://issues.apache.org/jira/browse/YARN-7924
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Akira Ajisaka
>            Priority: Minor
>
> The use of {{Collections.EMPTY_SET}} and {{Collections.EMPTY_MAP}} often 
> causes unchecked assignment and it should be replaced with 
> {{Collections.emptySet()}} and {{Collections.emptyMap()}}. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to