Integrated: 8297682: Use Collections.emptyIterator where applicable

Andrey Turbanov aturbanov at openjdk.org
Wed Dec 21 08:18:55 UTC 2022


On Mon, 7 Nov 2022 17:30:20 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: 85f9b37d
Author:    Andrey Turbanov <aturbanov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/85f9b37d71852d35a75d404e1657db0562dacac5
Stats:     4 lines in 2 files changed: 0 ins; 2 del; 2 mod

8297682: Use Collections.emptyIterator where applicable

Reviewed-by: stsypanov, alanb, jpai

-------------

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


More information about the compiler-dev mailing list