Integrated: 8297683: Use enhanced-for cycle instead of Enumeration in java.security.jgss
Andrey Turbanov
aturbanov at openjdk.org
Sun Dec 4 12:10:13 UTC 2022
On Sun, 27 Nov 2022 13:21:25 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> 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
This pull request has now been integrated.
Changeset: 0edb5d08
Author: Andrey Turbanov <aturbanov at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/0edb5d08055d8c06ed318a6c32e44a070ab4d002
Stats: 31 lines in 2 files changed: 0 ins; 23 del; 8 mod
8297683: Use enhanced-for cycle instead of Enumeration in java.security.jgss
Reviewed-by: weijun
-------------
PR: https://git.openjdk.org/jdk/pull/11377
More information about the security-dev
mailing list