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

Weijun Wang weijun at openjdk.java.net
Tue Dec 14 18:42:42 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.

This pull request has now been integrated.

Changeset: 0cc989b7
Author:    Weijun Wang <weijun at openjdk.org>
URL:       https://git.openjdk.java.net/jdk18/commit/0cc989b7d2fa3b903d71b7baab53b853455005ba
Stats:     65 lines in 2 files changed: 64 ins; 0 del; 1 mod

8278744: KeyStore:getAttributes() not returning unmodifiable Set

Reviewed-by: mullan

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

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


More information about the security-dev mailing list