java.util.Enumeration is a legacy interface from java 1.0. There are a few 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.
sun.security.jgss.ProviderList#addAllMechsFromProvider sun.security.jgss.GSSCredentialImpl#dispose sun.security.jgss.GSSCredentialImpl#getRemainingLifetime sun.security.jgss.GSSCredentialImpl#getUsage() sun.security.jgss.GSSCredentialImpl#getElements ------------- Commit messages: - 8297683: Use enhanced-for cycle instead of Enumeration in java.security.jgss Changes: https://git.openjdk.org/jdk/pull/11377/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11377&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8297683 Stats: 31 lines in 2 files changed: 0 ins; 23 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/11377.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11377/head:pull/11377 PR: https://git.openjdk.org/jdk/pull/11377