On Sun, 17 Mar 2024 01:20:17 GMT, Nizar Benalla <d...@openjdk.org> wrote:
>> src/java.base/share/classes/javax/crypto/interfaces/DHPublicKey.java line 68: >> >>> 66: * >>> 67: * @return {@inheritDoc java.security.AsymmetricKey} >>> 68: * @since 22 >> >> Hello Nizar, are the removal of `@since` in this PR intentional? I haven't >> checked all of them, but this specific removal appears incorrect, since this >> method was indeed introduced in Java 22 as part of >> https://bugs.openjdk.org/browse/JDK-8318096. > > Hello Jaikiran, > in jdk21 DHPPublicKey did have a > [getParams()](https://github.com/openjdk/jdk21/blob/890adb6410dab4606a4f26a942aed02fb2f55387/src/java.base/share/classes/com/sun/crypto/provider/DHPublicKey.java#L244) > method, so it is not new in jdk 22. It also existed [before > that](https://github.com/openjdk/jdk11/blob/37115c8ea4aff13a8148ee2b8832b20888a5d880/src/java.base/share/classes/com/sun/crypto/provider/DHPublicKey.java#L252) > > If you haven't looked at the other cases, I was about to group the changes > related to the Key interfaces in a separate PR if that's fine. let me know > what you think Hello, While the override of `getParams` in `DHPublicKey` was added, the `getParams` method has been inherited to `DHPublicKey` for a long time from `DHKey`. E.g., I can take this: import javax.crypto.interfaces.DHPublicKey; public class DhkeyTest { public static void main(DHPublicKey key) { System.err.println(key.getParams()); } } and compile using JDK 8 without any compile-time errors. So, it would make more sense to me to not add the `@since` for it. I believe Nizar will separate the changes to the Key interfaces into a separate PR, so we can discuss in more detail there. Thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18055#discussion_r1528625403