--- 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();
}