On Wed, 11 May 2022 23:45:00 GMT, Weijun Wang <wei...@openjdk.org> wrote:
>> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Changed to extend various CipherSpi implementations. > > src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java > line 171: > >> 169: >> 170: // holder for the derived key and iv >> 171: private static class KeyAndIv implements Closeable { > > You can make this a `record`. Sure, good suggestion~ > src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java > line 317: > >> 315: Arrays.fill(derivedKey, (byte)0); >> 316: >> 317: KeyAndIv result; > > I think the fancy 2022 way is to `return switch (...) { case "RC4" -> new > KeyAndIv(...) ... }`. Ok~ ------------- PR: https://git.openjdk.java.net/jdk/pull/8521