RE: What methods should go into a java.util.Objects class in JDK 7?

2009-10-02 Thread Jason Mehrens
> I think a better name would be "defaultToString" since it is the default > toString from Object. However, I haven't ever heard anyone else request > easier access to the default toString before so I'm not convinced this > should go into Objects. > > -Joe One use case is implementing toSt

Re: What methods should go into a java.util.Objects class in JDK 7?

2009-10-02 Thread Joe Darcy
Jason Mehrens wrote: > By toIdentityString, do you mean the String that would be returned by > toString if toString is not overridden? > > -Joe Yep. As in: return o != null ? o.getClass().getName() +'@' + Integer.toHexString(System.identityHashCode(o)) : "null"; I suppose

RE: What methods should go into a java.util.Objects class in JDK 7?

2009-10-02 Thread Jason Mehrens
> By toIdentityString, do you mean the String that would be returned by > toString if toString is not overridden? > > -Joe Yep. As in: return o != null ? o.getClass().getName() +'@'+ Integer.toHexString(System.identityHashCode(o)) : "null"; I suppose the name should be identityToStr

Re: What methods should go into a java.util.Objects class in JDK 7?

2009-10-02 Thread Joseph D. Darcy
Jason Mehrens wrote: Joe, > * null safe toString(Object), returning "null" for a null argument Doesn't String.valueOf do the same thing? http://java.sun.com/javase/6/docs/api/java/lang/String.html#valueOf(java.lang.Object

hg: jdk7/tl/jdk: 6787605: OpenSolaris doesn't have /usr/ucb/ps so ShellScaffold fails

2009-10-02 Thread tim . bell
Changeset: 9fcca0aae3da Author:tbell Date: 2009-10-02 08:49 -0700 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/9fcca0aae3da 6787605: OpenSolaris doesn't have /usr/ucb/ps so ShellScaffold fails Reviewed-by: dcubed ! test/com/sun/jdi/ShellScaffold.sh

RE: What methods should go into a java.util.Objects class in JDK 7?

2009-10-02 Thread Schulz, Stefan
> Joe Darcy wrote: > * null safe two-argument equals method > > +public static boolean equals(Object a, Object b) { > +return (a == b) || (a != null && a.equals(b)); > +} While I agree this being helpful, as I earlier stated, it would be nice to have a (additional?) method that t

RE: What methods should go into a java.util.Objects class in JDK 7?

2009-10-02 Thread Jason Mehrens
Joe, > * null safe toString(Object), returning "null" for a null argument Doesn't String.valueOf do the same thing? http://java.sun.com/javase/6/docs/api/java/lang/String.html#valueOf(java.lang.Object) What about a toIdentityString(Object) instead? Some of the nice properties of an id

hg: jdk7/tl/jdk: 2 new changesets

2009-10-02 Thread michael . mcmahon
Changeset: f0fdc4dd97d5 Author:michaelm Date: 2009-10-02 13:57 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/f0fdc4dd97d5 6870935: DIGEST proxy authentication fails to connect to URLs with no trailing slash Reviewed-by: chegar ! src/share/classes/sun/net/www/protocol/http/

Re: What methods should go into a java.util.Objects class in JDK 7?

2009-10-02 Thread Ulf Zibis
Am 02.10.2009 06:23, Joe Darcy schrieb: I wouldn't oppose a toDebugString(Object) method going into the platform somewhere, but I don't think it necessarily belongs in Objects. I suggest new class java.util.Debug to contain this and many other thinkable helper methods useful for developers.

hg: jdk7/tl/jdk: 4 new changesets

2009-10-02 Thread weijun . wang
Changeset: 527ad9cbc9cf Author:weijun Date: 2009-10-02 18:44 +0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/527ad9cbc9cf 6324292: keytool -help is unhelpful Reviewed-by: xuelei, mullan ! src/share/classes/sun/security/tools/KeyTool.java ! src/share/classes/sun/security/util/