commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conny Kreyßel (JIRA) <j...@apache.org>
Subject [jira] Created: (LANG-452) ObjectUtils.toString() should return constant empty String from StringUtils:EMPTY instead a new Empty String
Date Mon, 28 Jul 2008 16:27:31 GMT
ObjectUtils.toString() should return constant empty String from StringUtils:EMPTY instead a
new Empty String
------------------------------------------------------------------------------------------------------------

                 Key: LANG-452
                 URL: https://issues.apache.org/jira/browse/LANG-452
             Project: Commons Lang
          Issue Type: Improvement
    Affects Versions: 2.4
            Reporter: Conny Kreyßel


In commons-lang 2.4 the method

 public static String toString(Object obj) {
        return obj == null ? "" : obj.toString();
 }

every call a new emptyb String. 

Is it possible to change it to 

public static String toString(Object obj) {
        return obj == null ? StringUtils.EMPTY : obj.toString();
    }

???

This change saves IMHO resources?!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message