RFR: 8297682: Use Collections.emptyIterator where applicable

Andrey Turbanov aturbanov at openjdk.org
Sun Nov 27 13:19:42 UTC 2022

Instead of `Collections.emptyList().iterator()` we can use `Collections.emptyIterator()` method.
Actual implementation of `java.util.Collections.EmptyList#iterator` does exactly this - just calls `emptyIterator` method.


Commit messages:
 - [PATCH] Use Collections.emptyIterator where applicable

Changes: https://git.openjdk.org/jdk/pull/11025/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11025&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8297682
  Stats: 4 lines in 2 files changed: 0 ins; 2 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/11025.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11025/head:pull/11025

PR: https://git.openjdk.org/jdk/pull/11025

More information about the compiler-dev mailing list