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
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
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).
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 something
different and more useful).
In favour/against +1/-1 ?
Stephen
2009/10/7 Joseph D. Darcy
+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
+1 for me.
+1 also for having the overloaded version that can accept a fallback string.
Paul
there
is between Jigsaw and j.u.Objects.
-Joe
Jason
Date: Thu, 8 Oct 2009 11:47:49 +0100
Subject: Objects.toString [Re: What methods should go into a
java.util.Objects class in JDK 7?]
From: scolebou...@joda.org
To: core-libs-dev@openjdk.java.net
A number of us are proposing
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? Everyone
who has opined did disagree with replicating String.valueOf()
behavior. I don't see
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 in
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:
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
: 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 preparing the first round of java.util.Objects with the
single
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
13 matches
Mail list logo