You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2008/05/30 09:19:44 UTC

[jira] Reopened: (LANG-420) Rename ObjectUtils.toString() to asString().

     [ https://issues.apache.org/jira/browse/LANG-420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bourg reopened LANG-420:
---------------------------------


Reopening, this issue exists with static imports. For example with the following code :

{code:java}
import static org.apache.commons.lang.ObjectUtils.*;

public class Test {
    {
        toString(null, "");
    }
}
{code}

The compiler complains that toString() in java.lang.Object cannot be applied to (<nulltype>,java.lang.String).


> Rename ObjectUtils.toString() to asString().
> --------------------------------------------
>
>                 Key: LANG-420
>                 URL: https://issues.apache.org/jira/browse/LANG-420
>             Project: Commons Lang
>          Issue Type: Improvement
>    Affects Versions: 2.3
>            Reporter: Stephen Kestle
>            Priority: Trivial
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> With Java 5 static method inlining, methods do not require class qualifying *unless* the class already has the method.
> For this reason, ObjectUtlis.toString() cannot be inlined to toString(), as Object has a toString() method.  
> It would be nice for it to have a name that could be statically imported, such as asString.  This would follow the naming convention of Arrays.asList()
> Note that this DOES NOT need a java 5 version of lang.

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