On Tue, 15 Nov 2022 16:07:37 GMT, Weijun Wang <[email protected]> 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.
>
> src/java.base/share/classes/javax/crypto/CryptoPermissions.java line 232:
>
>> 230: // find out if there is anything we should add into
>> 231: // ret.
>> 232: for (var entry : perms.entrySet()) {
>
> Can we keep the old style? i.e. iterate over `for (var alg :
> this.perms.keySet())`?
>
> Same with the change on line 270 below.
Ok. reverted this part.
-------------
PR: https://git.openjdk.org/jdk/pull/11022