[jdk18] RFR: 8278744: KeyStore:getAttributes() not returning unmodifiable Set

Sean Mullan mullan at openjdk.java.net
Tue Dec 14 18:08:34 UTC 2021


On Tue, 14 Dec 2021 15:24:58 GMT, Weijun Wang <weijun at openjdk.org> wrote:

> Make the return value of `PKCS12KeyStore::engineGetAttributes` immutable. Gather the `getAttributes()` value into a new `HashSet` and then make it immutable. This ensures the final result itself is not mutable and it also will not change even if the internal `entry.attributes` is modified.

Marked as reviewed by mullan (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk18/pull/23



More information about the security-dev mailing list