Re: review request for 6798511/6860431: Include functionality of Surrogate in Character -> use scenarios

2009-09-09 Thread Ulf Zibis
Am 09.09.2009 03:52, Martin Buchholz schrieb: I wish there had been more collaboration between the jdk developers (including myself) and the icu developers in the past. There has certainly been a fair amount of duplication of effort in the character encoding area. Maybe it would be better t

hg: jdk7/tl/jdk: 2 new changesets

2009-09-09 Thread sean . mullan
Changeset: 8252729d51a3 Author:mullan Date: 2009-09-09 09:54 -0400 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/8252729d51a3 6745437: Add option to only check revocation of end-entity certificate in a chain of certificates 6869739: Cannot check revocation of single certificate w

Re: 4206909 - adding Z_SYNC_FLUSH support to deflaters

2009-09-09 Thread Xueming Shen
Martin, Brandon, Alan I still believe the best choice at this moment is to be a little more conservative, given the DOS.flush() has been working in this behavior for decade. The proposed methods are good enough to serve the functionality required, I don't think it is worth breaking the compatib

Re: 4206909 - adding Z_SYNC_FLUSH support to deflaters

2009-09-09 Thread Brandon Long
I really don't understand this. I think just about everyone would expect that flush on an output stream means send all the data I've written. There are a large number of people who have stumbled on this bug and several others, and the fact that it wasn't fixed when it was discovered 10 years ago

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

2009-09-09 Thread Joe Darcy
Hello. For JDK 7, I think it is high-time the platform included a class like java.util.Objects to hold commonly-written utility methods. For example, a two-argument static equals method that returned true if both arguments are null, returns false is one argument is null, and otherwise return

Re: 4206909 - adding Z_SYNC_FLUSH support to deflaters

2009-09-09 Thread Alan Bateman
Xueming Shen wrote: Martin, Brandon, Alan I still believe the best choice at this moment is to be a little more conservative, given the DOS.flush() has been working in this behavior for decade. The proposed methods are good enough to serve the functionality required, I don't think it is worth

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

2009-09-09 Thread Andrew John Hughes
2009/9/9 Joe Darcy : > Hello. > > For JDK 7, I think it is high-time the platform included a class like > java.util.Objects to hold commonly-written utility methods.  For example, a > two-argument static equals method that returned true if both arguments are > null, returns false is one argument is

Re: 4206909 - adding Z_SYNC_FLUSH support to deflaters

2009-09-09 Thread Xueming Shen
I sometime too feels the same frustration when get kicked by the compatibility, especially if you have to back out hundreds of lines of code just because it is "incompatible". I guess someone said it right a while ago, the compatibility sucks, but yes, MOST end user/developer like it. I disa

Re: 4206909 - adding Z_SYNC_FLUSH support to deflaters

2009-09-09 Thread Martin Buchholz
JDK has often chosen compatibility over doing something Right. I think the risk of performance degradation due to frequent calls to flush() is higher than one might think at first. Calls to flush may be made on one's behalf by some middleware between the user and the DOS. E.g. someone might wrap

hg: jdk7/tl/jdk: 6737212: Fixed javadoc warning messages in RowSet classes

2009-09-09 Thread lance . andersen
Changeset: f1eb4c28b313 Author:lancea Date: 2009-09-09 20:15 -0400 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/f1eb4c28b313 6737212: Fixed javadoc warning messages in RowSet classes Reviewed-by: darcy ! src/share/classes/com/sun/rowset/JdbcRowSetResourceBundle.java ! src/share/

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

2009-09-09 Thread Ismael Juma
Joe Darcy writes: > A static hashCode method returning 0 for null and the value of > arg.hashCode() has also been suggested. > > A set of > > static int compareTo(int, int) > static int compareTo(long, long) > > > methods probably belongs somewhere in the platform too. Althou

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

2009-09-09 Thread Rémi Forax
Le 09/09/2009 22:40, Joe Darcy a écrit : Hello. For JDK 7, I think it is high-time the platform included a class like java.util.Objects to hold commonly-written utility methods. For example, a two-argument static equals method that returned true if both arguments are null, returns false is o

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

2009-09-09 Thread Kevin Bourrillion
-1 on reflection-based stuff in the Objects class. equal() and hashCode() are the only two things we saw fit to include in our Objects class, and actually, our hashCode() is identical to Arrays.hashCode() (but is varargs). http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/comm

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

2009-09-09 Thread Joe Darcy
Kevin Bourrillion wrote: -1 on reflection-based stuff in the Objects class. equal() and hashCode() are the only two things we saw fit to include in our Objects class, and actually, our hashCode() is identical to Arrays.hashCode() (but is varargs). http://google-collections.googlecode.com/svn

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

2009-09-09 Thread Rémi Forax
Le 09/09/2009 23:22, Andrew John Hughes a écrit : Given you've listed utility methods for two Object methods, equals and hashCode, toString seems an obvious one to handle as well: public static String toString(Object o) throws IllegalAccessException { Class c = o.getClass(); StringBuil

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

2009-09-09 Thread Andrew John Hughes
2009/9/10 Rémi Forax : > Le 09/09/2009 23:22, Andrew John Hughes a écrit : >> >> Given you've listed utility methods for two Object methods, equals and >> hashCode, toString seems an obvious one to handle as well: >> >> public static String toString(Object o) >>   throws IllegalAccessException >> {

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

2009-09-09 Thread Rémi Forax
Le 10/09/2009 01:43, Andrew John Hughes a écrit : 2009/9/10 Rémi Forax: Le 09/09/2009 23:22, Andrew John Hughes a écrit : Given you've listed utility methods for two Object methods, equals and hashCode, toString seems an obvious one to handle as well: public static String toString(Ob

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

2009-09-09 Thread Stephen Colebourne
2009/9/9 Joe Darcy : > What other utility methods would have broad enough use and applicability to > go into a common java.util class? Well, my first selection is here http://www.jroller.com/scolebourne/entry/jdk_7_method_suggestions To keep the discussion here valid too, I'll paste it below: Ste

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

2009-09-09 Thread Martin Buchholz
Google would like to contribute implementations of the methods below. Here's a webrev: http://cr.openjdk.java.net/~martin/webrevs/openjdk7/compare/ We have tests (not yet included) but they would need to be jtreg-ified. Is there any junit support yet for jtreg? Martin On Wed, Sep 9, 2009 at 16:

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

2009-09-09 Thread Martin Buchholz
Here's a bunch of static hashCode methods for primitives: http://cr.openjdk.java.net/~martin/webrevs/openjdk7/hashCode/ This doesn't include a public static int hashCode(object x) { return x == null ? 0 : x.hashCode(); } that I think was also being asked for, and which might be a candidate for

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

2009-09-09 Thread Joe Darcy
Martin Buchholz wrote: Google would like to contribute implementations of the methods below. Here's a webrev: http://cr.openjdk.java.net/~martin/webrevs/openjdk7/compare/ Wherever these compare methods go, into the N wrapper classes or into java.util.Compare, I think the instance method co

Race condition in Class.getName()

2009-09-09 Thread Martin Buchholz
It is believed that the java memory model allows Class.getName() to return null. This is one of those methods with an intentional data race. Probably this has not been seen in practice because only a perverse or adversarial runtime would load the "name" field twice, out-of-order, as it seems to be

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

2009-09-09 Thread Joe Darcy
Martin Buchholz wrote: Here's a bunch of static hashCode methods for primitives: http://cr.openjdk.java.net/~martin/webrevs/openjdk7/hashCode/ Hmm, I'd be more inclined to group these methods into Objects as part of a "universal hash" functionality. This doesn't include a public static

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

2009-09-09 Thread Rémi Forax
Le 10/09/2009 02:15, Martin Buchholz a écrit : Here's a bunch of static hashCode methods for primitives: http://cr.openjdk.java.net/~martin/webrevs/openjdk7/hashCode/ This doesn't include a public static int hashCode(object x) { return x == null ? 0 : x.hashCode(); } that I think was also bei

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

2009-09-09 Thread Martin Buchholz
On Wed, Sep 9, 2009 at 17:34, Joe Darcy wrote: > Martin Buchholz wrote: >> >> Google would like to contribute implementations of the methods below. >> Here's a webrev: >> >> http://cr.openjdk.java.net/~martin/webrevs/openjdk7/compare/ >> > > Wherever these compare methods go, into the N wrapper cla

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

2009-09-09 Thread Joe Darcy
Martin Buchholz wrote: On Wed, Sep 9, 2009 at 17:34, Joe Darcy wrote: Martin Buchholz wrote: Google would like to contribute implementations of the methods below. Here's a webrev: http://cr.openjdk.java.net/~martin/webrevs/openjdk7/compare/ Wherever these compare methods go, i

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

2009-09-09 Thread Martin Buchholz
On Wed, Sep 9, 2009 at 17:54, Rémi Forax wrote: > Le 10/09/2009 02:15, Martin Buchholz a écrit : >> >> Here's a bunch of static hashCode methods for primitives: >> >> http://cr.openjdk.java.net/~martin/webrevs/openjdk7/hashCode/ >> >> This doesn't include a >> >> public static int hashCode(object x

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

2009-09-09 Thread Martin Buchholz
I've updated the hashCode patch to include Booleans and similar refactoring as in compare. We could do worse than to do hashCode in a totally analogous fashion to compare, but I could also see them incorporated into a static HashCodes class. If you put one into Objects, then the primitive hashCode

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

2009-09-09 Thread Martin Buchholz
On Wed, Sep 9, 2009 at 17:40, Joe Darcy wrote: > > PS This talk of hashing remind me of a small spec cleanup: > 4245470 algorithm of java.lang.Byte.hashCode() is not specified > http://bugs.sun.com/view_bug.do?bug_id=4245470 > http://cr.openjdk.java.net/~martin/webrevs/openjdk7/hashCode-spec/ Mar

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

2009-09-09 Thread Joe Darcy
Martin Buchholz wrote: On Wed, Sep 9, 2009 at 17:40, Joe Darcy wrote: PS This talk of hashing remind me of a small spec cleanup: 4245470 algorithm of java.lang.Byte.hashCode() is not specified http://bugs.sun.com/view_bug.do?bug_id=4245470 http://cr.openjdk.java.net/~martin/webrevs/op

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

2009-09-09 Thread Reinier Zwitserloot
Late to the thread, so many one-liners to various ideas uttered on the list: -- This is great stuff folks. As long as I get my String.join (or Collections.join, or Arrays.join, or Whatever.join, as long as there's a join!), of course :) -- The compareTo methods for Integer/Short/Byte/Lo