[ https://issues.apache.org/jira/browse/HADOOP-15223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16362712#comment-16362712 ]
Akira Ajisaka commented on HADOOP-15223: ---------------------------------------- Thanks [~zhenyi] for the patch! Some comments: 1. Would you remove existing {{@SuppressWarning("unchecked")}} annotations if the annotation is unnecessary? For example, the following annotation is unnecessary after the change. {code} @SuppressWarnings("unchecked") public Map<String, String> getAttributes() { return (attributes == null) ? Collections.emptyMap() : attributes; } {code} 2. There are some remaining {{Collections.EMPTY_MAP}} and {{Collections.EMPTY_SET}}. Would you replace them? 3. I noticed {{Collections.EMPTY_LIST}} can be replaced with {{Collections.emptyList()}} as well. Would you replace them? > Replace Collections.EMPTY_SET and EMPTY_MAP with emptySet() and emptyMap() > when available > ----------------------------------------------------------------------------------------- > > Key: HADOOP-15223 > URL: https://issues.apache.org/jira/browse/HADOOP-15223 > Project: Hadoop Common > Issue Type: Bug > Reporter: Akira Ajisaka > Assignee: fang zhenyi > Priority: Minor > Labels: newbie > Attachments: HADOOP-15223.001.patch > > > 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: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org