mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8297074: Use enhanced-for cycle instead of Enumeration in javax.crypto
Reviewed-by: weijun, wetmore
This commit is contained in:
parent
819af69f40
commit
66228f77fe
3 changed files with 6 additions and 36 deletions
|
@ -229,10 +229,7 @@ implements Serializable {
|
|||
// For each algorithm in this CryptoPermissions,
|
||||
// find out if there is anything we should add into
|
||||
// ret.
|
||||
Enumeration<String> thisKeys = this.perms.keys();
|
||||
while (thisKeys.hasMoreElements()) {
|
||||
String alg = thisKeys.nextElement();
|
||||
|
||||
for (String alg : this.perms.keySet()) {
|
||||
PermissionCollection thisPc = this.perms.get(alg);
|
||||
PermissionCollection thatPc = other.perms.get(alg);
|
||||
|
||||
|
@ -270,9 +267,7 @@ implements Serializable {
|
|||
maxKeySize =
|
||||
((CryptoPermission)
|
||||
thisWildcard.elements().nextElement()).getMaxKeySize();
|
||||
Enumeration<String> thatKeys = other.perms.keys();
|
||||
while (thatKeys.hasMoreElements()) {
|
||||
String alg = thatKeys.nextElement();
|
||||
for (String alg : other.perms.keySet()) {
|
||||
|
||||
if (this.perms.containsKey(alg)) {
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue