From 01bc5d9667898d54de1d11d9bcfd90f04b629e1b Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Fri, 14 Dec 2018 21:42:32 -0600 Subject: [PATCH] Updated Enumeration emul for Java 9 Change-Id: I096e11d25c8829198c0e71b4ef0d735056e45802 --- .../com/google/gwt/emul/java/util/Enumeration.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/user/super/com/google/gwt/emul/java/util/Enumeration.java b/user/super/com/google/gwt/emul/java/util/Enumeration.java index 1f0c8adce1c..26fc44b0ee2 100644 --- a/user/super/com/google/gwt/emul/java/util/Enumeration.java +++ b/user/super/com/google/gwt/emul/java/util/Enumeration.java @@ -27,4 +27,17 @@ public interface Enumeration { boolean hasMoreElements(); E nextElement(); + + default Iterator asIterator() { + return new Iterator() { + @Override + public boolean hasNext() { + return hasMoreElements(); + } + @Override + public E next() { + return nextElement(); + } + }; + } }