RFR: 8295823: Use enhanced-for cycle instead of Enumeration in java.naming

Aleksei Efimov aefimov at openjdk.org
Mon Oct 24 11:32:55 UTC 2022


On Thu, 20 Oct 2022 20:28:37 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

> `java.util.Enumeration` is a legacy interface from java 1.0.
> There are couple of cycles which use it to iterate over collections. We can replace this manual cycle with enchanced-for, which is shorter and easier to read.

Hi Andrey,

The changes look reasonable to me.
The JNDI tests (JCK/regression) are also happy with it.

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

Marked as reviewed by aefimov (Committer).

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


More information about the core-libs-dev mailing list