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

2016-09-09 Thread Andrej Golovnin
Hi Patrick, looks good for me. Thanks! Best regards, Andrej Golovnin

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

2016-09-08 Thread Patrick Reinhart
I tried to include all the feedback here: http://cr.openjdk.java.net/~reinhapa/reviews/8161230/webrev.04 -Patrick On 08.09.2016 20:09, Paul Sandoz wrote: >> On 8 Sep 2016, at 08:20, Patrick Reinhart wrote: >>> And one more thing. Because we have now only one method to get a

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

2016-09-08 Thread Andrej Golovnin
Hi Patrick, >> 1362 * Returns a stream that loads the resources with the given name. >> 1375 * The loading of resources will occur when the returned stream >> is >> 1376 * evaluated. If the loading of resources results in an >> {@code IOException} >> In reality however, no

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

2016-09-08 Thread Paul Sandoz
> On 8 Sep 2016, at 08:20, Patrick Reinhart wrote: >> And one more thing. Because we have now only one method to get a >> stream I think the constant RESOURCE_CHARACTERISTICS should be defined >> inside the #resources()-method. It is not needed to define it as a >> static

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

2016-09-08 Thread Mandy Chung
> On Sep 8, 2016, at 12:16 AM, Andrej Golovnin > wrote: > > Hi all, > > Maybe I'm wrong but I think the JavaDocs for the new method need more > love. The JavaDocs mention at multiple places that resources are > loaded, e.g.: > > 1362 * Returns a stream that

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

2016-09-08 Thread Patrick Reinhart
On 2016-09-08 09:16, Andrej Golovnin wrote: Hi all, Maybe I'm wrong but I think the JavaDocs for the new method need more love. The JavaDocs mention at multiple places that resources are loaded, e.g.: 1362 * Returns a stream that loads the resources with the given name. 1375 *

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

2016-09-08 Thread Andrej Golovnin
Hi all, Maybe I'm wrong but I think the JavaDocs for the new method need more love. The JavaDocs mention at multiple places that resources are loaded, e.g.: 1362 * Returns a stream that loads the resources with the given name. 1375 * The loading of resources will occur when the

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

2016-09-07 Thread Mandy Chung
> On Sep 7, 2016, at 2:40 PM, Patrick Reinhart wrote: > > > http://cr.openjdk.java.net/~reinhapa/reviews/8161230/webrev.03 Thanks for the update. Looks good. Mandy

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

2016-09-07 Thread Paul Sandoz
> On 7 Sep 2016, at 14:40, Patrick Reinhart wrote: > > I updated the webrev accordingly > > http://cr.openjdk.java.net/~reinhapa/reviews/8161230/webrev.03 > Looks good. I’ll handle the internal process bits. Paul.

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

2016-09-07 Thread Patrick Reinhart
Hi Paul, On 07.09.2016 22:59, Paul Sandoz wrote: >> On 7 Sep 2016, at 13:14, Patrick Reinhart wrote: >> >> >> Hi Paul, >> >> With the change for https://bugs.openjdk.java.net/browse/JDK-8165563 >> that Mandy has sent to review here: >> >>

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

2016-09-07 Thread Paul Sandoz
> On 7 Sep 2016, at 13:14, Patrick Reinhart wrote: > > > Hi Paul, > > With the change for https://bugs.openjdk.java.net/browse/JDK-8165563 > that Mandy has sent to review here: > > http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-September/043363.html > > the

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

2016-09-07 Thread Patrick Reinhart
Hi Paul, With the change for https://bugs.openjdk.java.net/browse/JDK-8165563 that Mandy has sent to review here: http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-September/043363.html the method getSystemResources where systemResources method relies on, in my understanding should be

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

2016-09-07 Thread Paul Sandoz
Hi Patrick, I will sponsor this. Given what Mandy says about the system class loader i think we can drop the method systemResources. There is some “race memory" not captured in the specification, which should be updated, as Mandy says. Then… 1401 public Stream resources(String name) {

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

2016-09-07 Thread Patrick Reinhart
The current changes can be found here: http://cr.openjdk.java.net/~reinhapa/reviews/8161230/webrev.03 On 07.09.2016 02:39, Mandy Chung wrote: > There was already an discussion about this with Alan Bateman: >> http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-August/042792.html >> > I

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

2016-09-06 Thread Mandy Chung
> On Sep 3, 2016, at 12:55 PM, Patrick Reinhart wrote: > > Hi Mandy, > > The current changes can be found here: > > http://cr.openjdk.java.net/~reinhapa/reviews/8161230/webrev.02 > > > On 02.09.2016 23:11, Mandy Chung wrote: >>> On Sep 2, 2016, at 2:50 AM, Patrick

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

2016-09-03 Thread Patrick Reinhart
Hi Mandy, The current changes can be found here: http://cr.openjdk.java.net/~reinhapa/reviews/8161230/webrev.02 On 02.09.2016 23:11, Mandy Chung wrote: >> On Sep 2, 2016, at 2:50 AM, Patrick Reinhart wrote: >> >> Updated the existing >>

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

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: 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: > >>

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

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

2016-09-02 Thread Andrej Golovnin
Hi Patrick, 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 just too huge. Your patch seems

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

2016-09-01 Thread Tagir Valeev
Hello! The documentation says: + * The search order is described in the documentation for {@link+ * #getResource(String)}. I think it means that the order of the stream is well-defined. In this case should not we add ORDERED spliterator characteristic? With best regards, Tagir

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

2016-09-01 Thread Patrick Reinhart
Hi Alan, Hi Paul, Here is the first revision of the implementation based on our earlier conversation. http://cr.openjdk.java.net/~reinhapa/reviews/8161230/webrev.00 - Patrick