RFR: 8303832: Use enhanced-for cycle instead of Enumeration in JceKeyStore

Weijun Wang weijun at openjdk.org
Thu Mar 9 00:17:12 UTC 2023


On Wed, 8 Mar 2023 19:10:11 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

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

`Enumeration` is legacy because `Hashtable` behind it is legacy. But is it worth modifying `Hashtable` to `ConcurrentHashMap`? IMHO no.

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

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



More information about the security-dev mailing list