RFR: JDK-8161230 - Create java.util.stream.Stream from Iterator / Enumeration

Alan Bateman Alan.Bateman at oracle.com
Fri Aug 5 04:18:39 UTC 2016

On 04/08/2016 10:33, Patrick Reinhart wrote:

> Hi Paul,
> I was quit busy lately and this comes a bit late, I guess you do not have less work ;-)
> On 15.07.2016 17:10, Paul Sandoz wrote:
>>> When I understand you correctly here we should concentrate on the public
>>> methods naming firstly? I initially was not sure, what a proper naming
>>> for the steams method was. It seem to me reasonable the way Stuart pointed
>>> them out on his first comment to name them something like this:
>>> Stream<URL> resources(String name)
>>> Stream<URL> systemResources(String name)
>>> Yes.
> I have a first proposal for the new methods and their documentation to start with the discussion about the actual API without the implementation jet:
The method names look right but I don't think `throws IOException` is 
needed. If overridden then the implementations could be truely lazy and 
the method will need to specify how stream operations will wrap the 
errors in UncheckedIOExceptions.

For the initial sentence then it might be better to say that it "Returns 
a stream that loads the resources ...".

As I was mentioned previously, we will be replacing the javadoc for the 
existing methods and this will impact the wording for the new methods. 
It's okay to align the wording for the new methods with the old and 
we'll adjust once there is agreement on the proposal in JSR 376 and we 
bring the changes to JDK 9.


More information about the core-libs-dev mailing list