On Tue, 7 Jun 2022 20:52:33 GMT, Hai-May Chao <hc...@openjdk.org> wrote:
>> Please review a small fix in CryptoPolicyParser class that it should not >> pass “processedPermissions” parameter by value. >> Ran MACH5 tier1 and tier2 without failures. > > Hai-May Chao has updated the pull request incrementally with two additional > commits since the last revision: > > - Inconsistent entries test > - Inconsistent entries test src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java line 202: > 200: if (!processedPermissions.isEmpty()) { > 201: throw new ParsingException(st.lineno(), "Inconsistent > policy"); > 202: } Instead of setting the `allPermEntryFound` flag, what if you instead put an entry for `CryptoAllPermission.ALG_NAME` in `processedPermissions` here. Then if there are more entries after this, I think `isConsistent` will catch it in the following code: if (processedPermissions.containsKey(CryptoAllPermission.ALG_NAME)) { return false; } ------------- PR: https://git.openjdk.org/jdk/pull/8985