langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Iterators.java
changeset 41862 471a0cb1b986
parent 41441 8fb8d9c6c687
child 44185 309b455e3ccc
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Iterators.java	Tue Nov 01 10:14:42 2016 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Iterators.java	Tue Nov 01 10:51:53 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,9 +62,9 @@
         }
 
         public O next() {
-            if (!hasNext())
+            if (currentIterator == EMPTY && !hasNext()) {
                 throw new NoSuchElementException();
-
+            }
             return currentIterator.next();
         }