On Tue, 6 Sep 2022 14:16:28 GMT, Weijun Wang <wei...@openjdk.org> wrote:
>> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> more refactoring. > > src/java.base/share/classes/java/security/Security.java line 613: > >> 611: // For each selection criterion, remove providers >> 612: // which don't satisfy the criterion from the candidate set. >> 613: Iterator<Map.Entry<String, String>> iter = entries.iterator(); > > `for (var e : entries)` is simpler. > > Inside the loop, you can also directly return `null` is it's empty. Then > there is no need to check for `isEmpty` again outside. Yup, very good idea. I will apply it. Thanks! > src/java.base/share/classes/java/security/Security.java line 824: > >> 822: private String algName; >> 823: private String attrName = null; >> 824: private String attrValue; > > Make these `final`. Sure~ ------------- PR: https://git.openjdk.org/jdk/pull/10008