On Thu, 10 Nov 2022 14:43:00 GMT, Weijun Wang <wei...@openjdk.org> wrote:
>> src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java line >> 199: >> >>> 197: if (tmp != null) { >>> 198: this.algid = tmp; >>> 199: this.params = null; >> >> There is a getAlgParameters() method in the class. Does it make sense to >> cache the params? > > OK. Thanks. I rethink about this. More logic is needed when both can be non-null. On the other hand, `algid.getParameters()` just returns a field. I'd rather keep my original code. ------------- PR: https://git.openjdk.org/jdk/pull/11067