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.
------------- Commit messages: - 8278744: KeyStore:getAttributes() not returning unmodifiable Set Changes: https://git.openjdk.java.net/jdk18/pull/23/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=23&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278744 Stats: 65 lines in 2 files changed: 64 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk18/pull/23.diff Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/23/head:pull/23 PR: https://git.openjdk.java.net/jdk18/pull/23