Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6A4F0DF97 for ; Sun, 16 Sep 2012 02:37:08 +0000 (UTC) Received: (qmail 41258 invoked by uid 500); 16 Sep 2012 02:37:08 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 41218 invoked by uid 500); 16 Sep 2012 02:37:08 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 41019 invoked by uid 99); 16 Sep 2012 02:37:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Sep 2012 02:37:07 +0000 Date: Sun, 16 Sep 2012 13:37:07 +1100 (NCT) From: "Brandon Li (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <271207156.85086.1347763027883.JavaMail.jiratomcat@arcas> In-Reply-To: <2143281263.84741.1347740467649.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (HADOOP-8814) Inefficient comparison with the empty string. Use isEmpty() instead MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-8814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Li updated HADOOP-8814: ------------------------------- Status: Patch Available (was: Open) > Inefficient comparison with the empty string. Use isEmpty() instead > ------------------------------------------------------------------- > > Key: HADOOP-8814 > URL: https://issues.apache.org/jira/browse/HADOOP-8814 > Project: Hadoop Common > Issue Type: Improvement > Components: conf, fs, fs/s3, ha, io, metrics, performance, record, security, util > Reporter: Brandon Li > Assignee: Brandon Li > Priority: Minor > Attachments: HADOOP-8814.patch > > > Prior to JDK 6, we can check if a string is empty by doing "".equals(s) or s.equals(""). > Starting from JDK 6, String class has a new convenience and efficient method isEmpty() to check string's length. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira