Create java.util.stream.Stream from Iterator / Enumeration

Paul Sandoz paul.sandoz at oracle.com
Wed Jul 13 08:28:50 UTC 2016


Hi Patrick,

> On 12 Jul 2016, at 21:25, Patrick Reinhart <patrick at reini.net> wrote:
> 
> Hi Paul,
> 
> I finally got the time to create the enhancement issue JDK-8161230 for
> the alternative methods returning a Stream instead of an Enumeration.
> 

Ok.

I see some comments already by Stuart and Alan, and concur with Alan about working closely with jigsaw-dev.

Focusing on the public methods is good and then it will come down to naming them appropriately. Given that sub-classes can override the existing public Enumeration returning methods we most likely need to specify the implementation behaviour of the Stream returning methods i.e. specify in an @implSpec that they call the Enumeration returning methods. Later on it may be possible to sub-types to implement more optimally (but the Enumeration “string” is quite long and intertwined with the internal code base)

The protected findResources method may be trickier, i suggest leaving that one alone for now.

Paul.


More information about the core-libs-dev mailing list