Re: RFR: JDK-8046565: Platform Logger API and Service

2015-10-13 Thread Mandy Chung
> On Oct 8, 2015, at 5:26 AM, Daniel Fuchs wrote: > > webrev: > http://cr.openjdk.java.net/~dfuchs/8046565/proto.01/webrev.01/ System.Logger Several log methods throws NPE if the level is legible and the parameter is null. E.g. * @throws NullPointerException if

Re: RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

2015-10-13 Thread Peter Levart
Hi Roger, Mark and Mandy On 10/13/2015 03:12 AM, Mandy Chung wrote: On Oct 12, 2015, at 12:30 PM, mark.reinh...@oracle.com wrote: 2015/10/8 1:41 -0700, roger.ri...@oracle.com: Webrev: http://cr.openjdk.java.net/~rriggs/webrev-cleaner-extensible-8138696/ javadoc:

Re: RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

2015-10-13 Thread Remi Forax
Hi Roger, I agree with comments from Mark and Mandy, you can also simplify your code by using a lambda instead of a class to implement the thread factory. public static Cleaner create() { return create(runnable -> { return AccessController.doPrivileged((PrivilegedAction) () -> {

Re: Array equality, comparison and mismatch

2015-10-13 Thread Paul Sandoz
> On 13 Oct 2015, at 05:46, Mike Duigou wrote: > >>> - I apologize if this was discussed earlier in the thread but why is the >>> comparison of floats and doubles done by first == operator of the int bits >>> and only then the compare method ? >> I was being consistent

Re: Array equality, comparison and mismatch

2015-10-13 Thread Andrew Haley
On 13/10/15 10:22, Paul Sandoz wrote: > Analysis so far indicate big gains are to be had on larger arrays with better > or no impact on small arrays if i do the following instead: > > if (Double.doubleToRawLongBits(a[i]) != > Double.doubleToRawLongBits(b[i])) { > int c =

Re: RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

2015-10-13 Thread Roger Riggs
Hi Mark, Thanks for the review and comments. On 10/12/2015 3:30 PM, mark.reinh...@oracle.com wrote: 2015/10/8 1:41 -0700, roger.ri...@oracle.com: Webrev: http://cr.openjdk.java.net/~rriggs/webrev-cleaner-extensible-8138696/ javadoc: http://cr.openjdk.java.net/~rriggs/cleaner-doc2/

Re: RFR: 8073519: schemagen does not report errors while generating xsd files

2015-10-13 Thread Daniel Fuchs
Hi Aleksej, This looks good to me. Some blank lines in the test might make it more readable ;-) best regards, -- daniel On 09/10/15 23:09, Aleksej Efimov wrote: Hello, Please, review the fix for schemagen regression bug [1] in JDK9: The JDK9 (and JDK8 too) version of schemagen doesn't

Re: RFR: JDK-8136893: Improve early java.lang.invoke infrastructure initialization

2015-10-13 Thread Paul Sandoz
> On 13 Oct 2015, at 13:26, Claes Redestad wrote: >> >> Thus it seems fixMethodType is not necessary. I think this is confirmed when >> looking at up calls to linkMethodHandleConstant and linkCallSite. > > +1 - this should be a separate cleanup, though. > Yes.

Re: RFR: JDK-8136893: Improve early java.lang.invoke infrastructure initialization

2015-10-13 Thread Claes Redestad
Hello! On 2015-09-30 12:50, Paul Sandoz wrote: On 25 Sep 2015, at 17:19, Peter Levart wrote: Hi Paul, Thanks for looking into this. Apologies for the late reply. On 09/25/2015 04:07 PM, Paul Sandoz wrote: Hi, This looks like a partial dup of

Re: RFR: JDK-8136893: Improve early java.lang.invoke infrastructure initialization

2015-10-13 Thread Peter Levart
On 10/13/2015 01:47 PM, Paul Sandoz wrote: On 13 Oct 2015, at 13:26, Claes Redestad wrote: Thus it seems fixMethodType is not necessary. I think this is confirmed when looking at up calls to linkMethodHandleConstant and linkCallSite. +1 - this should be a

Re: RFR: JDK-8136893: Improve early java.lang.invoke infrastructure initialization

2015-10-13 Thread Vladimir Ivanov
Peter, Ok, thanks Paul, Michael and Claes! I'll push it later today or early tomorrow after running some more tests (nashorn for example). If anybody else wants to comment, there's still some time (for example about the name of the package-private method)... I'm late to the party :-) Don't

Re: RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

2015-10-13 Thread Roger Riggs
Hi Remi, That was the initial implementation. However, it was being invoked during startup before Lambda was initialized and resulted in an ExceptionInInitializer. We don't have a good handle on when it is too early to use lambda except by trial and error. I think there are some

Re: RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

2015-10-13 Thread Mandy Chung
> On Oct 13, 2015, at 1:31 AM, Peter Levart wrote: > > There is one usage of sun.misc.Cleaner.clean() in JavaFX, I think. The only one I know is to invoke the cleaner of the DirectBuffer (are you referring to that)? I can’t find any usage of sun.misc.Cleaner to create

Re: RFR: JDK-8046565: Platform Logging API and Service

2015-10-13 Thread Mandy Chung
> On Oct 13, 2015, at 5:14 AM, Daniel Fuchs wrote: > > Hi Mandy, > > > Thanks a lot for your feedback! > > On 13/10/15 04:50, Mandy Chung wrote: >> >> >> There are many new tests that I will need time to review them all. > > : My typo s/new tests/new classes/ >

Re: RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

2015-10-13 Thread Chris Hegarty
On 1 Oct 2015, at 15:12, Roger Riggs wrote: > …. > > Javadoc: > http://cr.openjdk.java.net/~rriggs/cleaner-doc/ > > Webrev: > http://cr.openjdk.java.net/~rriggs/webrev-cleaner-8138696/ This is nice addition. Some comments / questions: 1) Should the behaviour,

Re: RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

2015-10-13 Thread Roger Riggs
Hi Chris, Thanks for the comments... On 10/13/2015 3:06 PM, Chris Hegarty wrote: On 1 Oct 2015, at 15:12, Roger Riggs wrote: …. Javadoc: http://cr.openjdk.java.net/~rriggs/cleaner-doc/ Webrev: http://cr.openjdk.java.net/~rriggs/webrev-cleaner-8138696/ This is

Re: Optional.or name Re: RFR 8080418 Add Optional.or()

2015-10-13 Thread Stephen Colebourne
On 12 October 2015 at 08:48, Paul Sandoz wrote: > Now that the overall documentation changes and functional behaviour of > Optional.or has been agreed i would like to see if we can find a better name, > suggestions welcome, so lets get our paint brushes out :-) "or"

Re: RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

2015-10-13 Thread John Rose
On Oct 13, 2015, at 5:53 AM, Roger Riggs wrote: > > We don't have a good handle on when it is too early to use lambda except by > trial and error. > I think there are some improvements in the works so that some simple cases of > Lambda > can be used earlier and will see

Re: RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

2015-10-13 Thread Mandy Chung
> On Oct 13, 2015, at 6:56 AM, Roger Riggs wrote: > > When considering how to update the existing classes with finalize methods, it > became clear that > refactoring would be needed to separate out the state needed for the cleanup > from public object > that was being

Re: RFR: JDK-8136893: Improve early java.lang.invoke infrastructure initialization

2015-10-13 Thread Peter Levart
On 10/13/2015 02:18 PM, Vladimir Ivanov wrote: Peter, Ok, thanks Paul, Michael and Claes! I'll push it later today or early tomorrow after running some more tests (nashorn for example). If anybody else wants to comment, there's still some time (for example about the name of the