RFR: JDK-8161230 ClassLoader: add resource methods returning java.util.stream.Stream
andrej.golovnin at gmail.com
Thu Sep 8 07:16:01 UTC 2016
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
1362 * Returns a stream that loads the resources with the given name.
1375 * <p> The loading of resources will occur when the returned stream is
1376 * evaluated. If the loading of resources results in an
In reality however, no resources are loaded. Only URLs for all
resources that match the given name are created. To load the resources
you must open the connection on the returned URLs. Therefore I think
the JavaDocs do not reflect what the method does.
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 final field.
On Thu, Sep 8, 2016 at 12:53 AM, Mandy Chung <mandy.chung at oracle.com> wrote:
>> On Sep 7, 2016, at 2:40 PM, Patrick Reinhart <patrick at reini.net> wrote:
> Thanks for the update. Looks good.
More information about the core-libs-dev