RFR: JDK-8328501 Incorrect @since tags for security java security interfaces

Weijun Wang weijun at openjdk.org
Tue Mar 19 13:23:20 UTC 2024


On Tue, 19 Mar 2024 11:15:56 GMT, Nizar Benalla <duke at openjdk.org> wrote:

> The override of `getParams` in these interfaces was added in java 22 has an `@since 22`, but the method has been inherited to these interfaces for a long times,
> As pointed out by my mentor Jan, 
> 
> 
> import javax.crypto.interfaces.DHPublicKey;
> 
> public class DhkeyTest {
> 
>     public static void main(DHPublicKey key) {
>         System.err.println(key.getParams());
>     }
>     
> }
> 
> 
> this compiles using JDK 8 without any compile-time errors. The @ since tag shouldn't be here
> 
> 
> - the same goes for these other interfaces 
> 
> java.security.interfaces.DSAPublicKey
> java.security.interfaces.XECPublicKey
> java.security.interfaces.DSAPrivateKey
> java.security.interfaces.ECPrivateKey
> java.security.interfaces.XECPrivateKey
> java.security.interfaces.EdECPrivateKey
> java.security.interfaces.ECPublicKey
> java.security.interfaces.EdECPublicKey
> javax.crypto.interfaces.DHPrivateKey
> javax.crypto.interfaces.DHPublicKey
> 
> - these two should, have @ since 11 though 
> 
> java.security.interfaces.RSAPublicKey
> java.security.interfaces.RSAPrivateKey

I'd like to hear opinions from compiler experts.

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

PR Comment: https://git.openjdk.org/jdk/pull/18373#issuecomment-2007161883


More information about the compiler-dev mailing list