Eamonn McManus wrote:
David Holmes - Sun Microsystems wrote:
> So to me: String toString(Object o, String useIfNull) is the only
method
> that provides true utility in this case.
I agree with that, and would just suggest to the person specifying the
method
to add a @see String#valueOf(Object)
David Holmes - Sun Microsystems wrote:
> So to me: String toString(Object o, String useIfNull) is the only method
> that provides true utility in this case.
I agree with that, and would just suggest to the person specifying the method
to add a @see String#valueOf(Object). I find that the behavio
Am 09.10.2009 01:53, David Holmes - Sun Microsystems schrieb:
So to me: String toString(Object o, String useIfNull) is the only
method that provides true utility in this case.
I can follow this argumentation.
+1
-Ulf
Joe,
Joseph D. Darcy said the following on 10/09/09 04:30:
System.out.println("" + referenceOfAnyType);
will print "null" if referenceOfAnyType is null.
This is what the platform has done since the beginning.
Yes because String concatenation can not tolerate null values appearing,
so it is
Joe,
I understand your point, and that's why I countered with my String and
StringBuilder points. Those two classes are used underneath the covers
for inline concatenation, but, again, java.util.Objects has grander
intentions than string concatenation. This class is for all objects,
and however St
ors are useful.
Jason
> Date: Thu, 8 Oct 2009 10:51:50 -0700
> From: joe.da...@sun.com
> Subject: Re: Objects.toString [Re: What methods should go into a
> java.util.Objects class in JDK 7?]
> To: jason_mehr...@hotmail.com
> CC: core-libs-dev@openjdk.java.net
> I'm
Paul Benedict wrote:
Why would you choose to return "null" for any null object?
Because that is how the platform has always treated null in string
concatenation.
If you were defining new operations for String, StringBuilder, or
StringBuffer, I would agree with your choice. Since yo
>> Why would you choose to return "null" for any null object?
>
> Because that is how the platform has always treated null in string
> concatenation.
If you were defining new operations for String, StringBuilder, or
StringBuffer, I would agree with your choice. Since you are now
defining a global
Paul Benedict wrote:
Joe,
I'm preparing the first round of java.util.Objects with the
single-argument static toString method return "null" for null for final
review.
Why would you choose to return "null" for any null object?
Because that is how the platform has always treated null
Jason Mehrens wrote:
+1, return empty string for the one arg and add the two arg
variant. The j.u.Properties.getProperty(String, String) could use it
first. Just curious, what does project jigsaw think of j.u.Objects?
I'm preparing the first round of java.util.Objects with the
single-argume
+1, return empty string for the one arg and add the two arg variant. The
j.u.Properties.getProperty(String, String) could use it first. Just curious,
what does project jigsaw think of j.u.Objects?
Jason
> Date: Thu, 8 Oct 2009 11:47:49 +0100
> Subject: Objects.toString [Re: What method
+1 or drop Objects.toString(obj) completely.
-Ulf
Am 08.10.2009 12:47, Stephen Colebourne schrieb:
A number of us are proposing that Objects.toString(obj) should return
"" when the object is null. I'm strongly in favour of this, and it
removes any discussion of duplicated API (as it does somet
12 matches
Mail list logo