You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2013/08/10 00:18:49 UTC

[jira] [Commented] (HADOOP-8814) Inefficient comparison with the empty string. Use isEmpty() instead

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

Hudson commented on HADOOP-8814:
--------------------------------

SUCCESS: Integrated in Hadoop-trunk-Commit #4242 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/4242/])
update CHANGES.txt for HADOOP-8814 (brandonli: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1512515)
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt

                
> 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
>             Fix For: 3.0.0, 2.3.0, 2.1.1-beta
>
>         Attachments: HADOOP-8814.branch-2.patch, HADOOP-8814.patch, 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