From yarn-issues-return-137801-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Tue Feb 13 07:07:04 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id F216B180656 for ; Tue, 13 Feb 2018 07:07:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E146C160C61; Tue, 13 Feb 2018 06:07:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 33646160C3F for ; Tue, 13 Feb 2018 07:07:03 +0100 (CET) Received: (qmail 69482 invoked by uid 500); 13 Feb 2018 06:07:02 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 69458 invoked by uid 99); 13 Feb 2018 06:07:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Feb 2018 06:07:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id AAF701A0B66 for ; Tue, 13 Feb 2018 06:07:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -101.511 X-Spam-Level: X-Spam-Status: No, score=-101.511 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id x12BL2t8bEuZ for ; Tue, 13 Feb 2018 06:07:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id B9B3E5F398 for ; Tue, 13 Feb 2018 06:07:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 4B901E01A9 for ; Tue, 13 Feb 2018 06:07:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0D5F221E85 for ; Tue, 13 Feb 2018 06:07:00 +0000 (UTC) Date: Tue, 13 Feb 2018 06:07:00 +0000 (UTC) From: "Akira Ajisaka (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (YARN-7924) Replace Collections.EMPTY_SET and EMPTY_MAP with emptySet() and emptyMap() when available MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-7924?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16361= 861#comment-16361861 ]=20 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 replac= ed with {{Collections.emptySet()}} to avoid unchecked assignment. {code:java} public Set getAllocationTags() { return Collections.EMPTY_SET; }{code} was (Author: ajisakaa): In the following code, {{Collections.EMPTY_SET}} can be replaced with {{Col= lections.emptySet()}} to avoid unchecked assignment. {code:java} public Set 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.em= ptySet()}} and {{Collections.emptyMap()}}.=C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org