[Fwd: Code review request: 7072353 JNDI libraries do not build with javac -Xlint:all -Werror]

Rémi Forax forax at univ-mlv.fr
Thu Aug 4 16:34:15 UTC 2011


On 08/04/2011 06:17 PM, Colin Decker wrote:
> One better way to handle this in Java 8 would be to have a utility method
> that takes a Supplier<Enumeration<E>>  SAM argument (with a no-arg method
> that returns an Enumeration<E>) and returns an Iterable<E>  that gets a new
> Enumeration from the supplier each time iterator() is called. It could then
> be used with method references:
>
> Iterable<E>  iterable = Util.enumerationIterable(#object.getEnumeration);
>

you means Collections.list().

Rémi




More information about the core-libs-dev mailing list