Re: A bit of sugar for j.u.c.locks with try-with-resources?

2016-09-02 Thread Krystal Mok
Hi Vitaly, Thanks for your comments! On Fri, Sep 2, 2016 at 7:55 PM, Vitaly Davidovich wrote: > Hi Kris, > > > On Friday, September 2, 2016, Krystal Mok wrote: > >> Hi core-libs developers, >> >> I mostly live down in the VM world, but recently I've been playing with >> j.u.c.locks a bit, and

Re: A bit of sugar for j.u.c.locks with try-with-resources?

2016-09-02 Thread Vitaly Davidovich
Hi Kris, On Friday, September 2, 2016, Krystal Mok wrote: > Hi core-libs developers, > > I mostly live down in the VM world, but recently I've been playing with > j.u.c.locks a bit, and saw that there's an opportunity to retrofit the API > with the try-with-resources syntax. I wonder if anybody

A bit of sugar for j.u.c.locks with try-with-resources?

2016-09-02 Thread Krystal Mok
Hi core-libs developers, I mostly live down in the VM world, but recently I've been playing with j.u.c.locks a bit, and saw that there's an opportunity to retrofit the API with the try-with-resources syntax. I wonder if anybody has brought this topic up before; apologies if there had been. >From

Re: RFR(m): 8159404: immutable collections should throw UOE unconditionally

2016-09-02 Thread Stuart Marks
On 9/1/16 8:41 PM, Martin Buchholz wrote: Looks good to me! Thanks! Another idea for another day: I would like the immutable collections to be more optimal than they currently are, even if we have to write more code. It bugs me is that all of these collections have a modCount, despite never b

Re: Participating on https://bugs.openjdk.java.net/browse/JDK-8156070

2016-09-02 Thread Stuart Marks
Hi Jonathan, Welcome to OpenJDK, and thanks for your interest in JEP 269! I see you found a the subtasks of JDK-8156070, which is basically a container for a bunch of ideas for work on the JEP 269 collections. I took a quick look through them and this one seemed promising: JDK-8134373 explor

Re: RFR: 8151901: test/tools/pack200/Pack200Test fails on verifying native unpacked JAR

2016-09-02 Thread John Rose
> On Sep 2, 2016, at 10:14 AM, Kumar Srinivasan > wrote: > > Hi John, > > Please review the amended patch, based on our discussions. > http://cr.openjdk.java.net/~ksrini/8151901/webrev.01/ > > > Highlights: > * adjust the ordering of th

Re: RFR: JDK-8161230 ClassLoader: add resource methods returning java.util.stream.Stream

2016-09-02 Thread Mandy Chung
> On Sep 2, 2016, at 2:50 AM, Patrick Reinhart wrote: > > Updated the existing > http://cr.openjdk.java.net/~reinhapa/reviews/8161230/webrev.01 ClassLoader::resources returning Stream is a good addition. 1386 * {@code IOException} occur getting the next resource element, it must be 1

Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread harold seigel
On 9/2/2016 4:17 PM, fo...@univ-mlv.fr wrote: - Mail original - De: "harold seigel" À: "Remi Forax" Cc: "Alan Bateman" , "Hotspot dev runtime" , core-libs-dev@openjdk.java.net Envoyé: Vendredi 2 Septembre 2016 20:32:55 Objet: Re: RFR 8058575: IllegalAccessError trying to access pack

Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread forax
- Mail original - > De: "harold seigel" > À: "Remi Forax" > Cc: "Alan Bateman" , "Hotspot dev runtime" > , > core-libs-dev@openjdk.java.net > Envoyé: Vendredi 2 Septembre 2016 20:32:55 > Objet: Re: RFR 8058575: IllegalAccessError trying to access package-private > class from VM anonymou

Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread harold seigel
Hi Rémi, Thank you for looking at this change. Not allowing host classes to be array classes is not completely unrelated to this bug because it affects the implementation of the code that prepends the host class's package to the anonymous class. We decided to not allow array host classes in

Re: [jdk9] (XS) RFR: 8165243: Base64.Encoder.wrap(os).write(byte[], int, int) with incorrect arguments should not produce output

2016-09-02 Thread Roger Riggs
+1 On 9/2/2016 12:39 PM, Ivan Gerasimov wrote: Roger and Alan, thanks for suggestions! I incorporated most of them: http://cr.openjdk.java.net/~igerasim/8165243/02/webrev/ Is it good to go? Using RandomFactory looks okay although more awkward to run the test standalone, I assume rnd should

Re: RFR: 8151901: test/tools/pack200/Pack200Test fails on verifying native unpacked JAR

2016-09-02 Thread Kumar Srinivasan
Hi John, Please review the amended patch, based on our discussions. http://cr.openjdk.java.net/~ksrini/8151901/webrev.01/ Highlights: * adjust the ordering of the InnerClass and BootStrapMethods computations * enabled the test, and disabled memory leak check, which causes intermittent failur

Re: [jdk9] (XS) RFR: 8165243: Base64.Encoder.wrap(os).write(byte[], int, int) with incorrect arguments should not produce output

2016-09-02 Thread Xueming Shen
+1 On 09/02/2016 09:39 AM, Ivan Gerasimov wrote: Roger and Alan, thanks for suggestions! I incorporated most of them: http://cr.openjdk.java.net/~igerasim/8165243/02/webrev/ Is it good to go? Using RandomFactory looks okay although more awkward to run the test standalone, I assume rnd sh

Re: [jdk9] (XS) RFR: 8165243: Base64.Encoder.wrap(os).write(byte[], int, int) with incorrect arguments should not produce output

2016-09-02 Thread Ivan Gerasimov
Roger and Alan, thanks for suggestions! I incorporated most of them: http://cr.openjdk.java.net/~igerasim/8165243/02/webrev/ Is it good to go? Using RandomFactory looks okay although more awkward to run the test standalone, I assume rnd should be final. Since you changing a lot of usages t

Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread Remi Forax
Harold, disallowing array classes as host classes seems unrelated and knowing that jdk 10 or 11 will certainly add default methods to arrays, we will want to have anonymous classes with arrays as host class in order to acts as bridges/mixins. regards, Rémi - Mail original - > De: "harol

Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread harold seigel
Thanks Alan. I'll go ahead and make that change. Harold On 9/2/2016 10:43 AM, Alan Bateman wrote: On 02/09/2016 14:02, harold seigel wrote: Hi, Please review this new fix for JDK-8058575. This fix requires that a VM anonymous class be in either the same package as its host class or be

Re: [jdk9] (XS) RFR: 8165243: Base64.Encoder.wrap(os).write(byte[], int, int) with incorrect arguments should not produce output

2016-09-02 Thread Alan Bateman
On 02/09/2016 09:59, Ivan Gerasimov wrote: : On 01.09.2016 20:39, Alan Bateman wrote: TestBase64 is the unit test for this API, should the test be added to that instead? Yes, it should be better. http://cr.openjdk.java.net/~igerasim/8165243/01/webrev/ I also added another test case to m

Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread Alan Bateman
On 02/09/2016 14:02, harold seigel wrote: Hi, Please review this new fix for JDK-8058575. This fix requires that a VM anonymous class be in either the same package as its host class or be in the unnamed package. If the anonymous class is in the unnamed package then this fix puts it into i

Re: [jdk9] (XS) RFR: 8165243: Base64.Encoder.wrap(os).write(byte[], int, int) with incorrect arguments should not produce output

2016-09-02 Thread Roger Riggs
Hi Ivan, In the TestBase64.java: 563 throw new RuntimeException("Expected IOOBEx not thrown"); And 598 throw new RuntimeException("Expected IOOBEx not thrown"); I would say "was not thrown" to make the cause clearer. 567 throw new RuntimeException("No output expected"); I suppose this will nev

RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread harold seigel
Hi, Please review this new fix for JDK-8058575. This fix requires that a VM anonymous class be in either the same package as its host class or be in the unnamed package. If the anonymous class is in the unnamed package then this fix puts it into its host class's package, ensuring that the a

Re: Participating on https://bugs.openjdk.java.net/browse/JDK-8156070

2016-09-02 Thread Jonathan Bluett-Duncan
Hi Stuart Marks, I've been told by Martijn Verburg on the discuss mailing list that you're the lead person for the Immutable Collections enhancements piece. Is there anything I can do to help you out with https://bugs.openjdk. java.net/browse/JDK-8156070 or any other part of JEP 269

Re: RFR: JDK-8161230 ClassLoader: add resource methods returning java.util.stream.Stream

2016-09-02 Thread Patrick Reinhart
On 2016-09-02 10:10, Tagir Valeev wrote: Also small thing: Spliterator.NONNULL & Spliterator.IMMUTABLE Should be Spliterator.NONNULL | Spliterator.IMMUTABLE With best regards, Tagir Valeev. Updated the existing http://cr.openjdk.java.net/~reinhapa/reviews/8161230/webrev.01 - Patrick

Re: [jdk9] (XS) RFR: 8165243: Base64.Encoder.wrap(os).write(byte[], int, int) with incorrect arguments should not produce output

2016-09-02 Thread Ivan Gerasimov
Thank you Roger and Alan for review! On 01.09.2016 20:39, Alan Bateman wrote: TestBase64 is the unit test for this API, should the test be added to that instead? Yes, it should be better. http://cr.openjdk.java.net/~igerasim/8165243/01/webrev/ I also added another test case to make sure t

Re: RFR: JDK-8161230 ClassLoader: add resource methods returning java.util.stream.Stream

2016-09-02 Thread Tagir Valeev
Also small thing: > Spliterator.NONNULL & Spliterator.IMMUTABLE Should be Spliterator.NONNULL | Spliterator.IMMUTABLE With best regards, Tagir Valeev. On Fri, Sep 2, 2016 at 2:41 PM, Patrick Reinhart wrote: > On 2016-09-02 08:09, Andrej Golovnin wrote: > >> src/java.base/share/classes/java/la

Re: RFR: JDK-8161230 ClassLoader: add resource methods returning java.util.stream.Stream

2016-09-02 Thread Patrick Reinhart
On 2016-09-02 08:09, Andrej Golovnin wrote: src/java.base/share/classes/java/lang/ClassLoader.java The constant RESOURCE_CHARACTERISTICS in the line 215 should be defined near the #streamOf()-method. The distance between the line 1412 where the #streamOf()-method is defined and the line 215 is j