[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-compiler-dev
Subject: Re: RFR: JDK-8328501 Incorrect @since tags for security java security interfaces [v2]
From: Nizar Benalla <duke () openjdk ! org>
Date: 2024-03-19 15:33:34
Message-ID: g5LI1GjpfkbPbv5Diz8ddwZtoEXKSqlHGA0fHSHGgIM=.a2c8d10d-d0d7-4446-b007-fb27edf5d015 () github ! com
[Download RAW message or body]
> For context, I am writing tests to check for accurate use of `@since` tags in \
> documentation comments in source code. We're following these rules for now:
>
> if there's no `@since`:
>
> - for methods, look at the `@since` from the method from supertype this method \
> overrides. If there's none from the overridden method, or if the `@since` in the \
> enclosing class is newer that the one from the overridden method, use the `@since` \
> from the enclosing element. Otherwise, use the `@since` from the \
> overridden method.
> - otherwise, use the `@since` from the enclosing element.
>
> The override of `getParams` in these interfaces was done in in JDK 22 and an \
> `@since 22` was, but this method has been inherited to these interfaces for a long \
> time.
> 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
> java.security.interfaces.RSAPublicKey
> java.security.interfaces.RSAPrivateKey
Nizar Benalla has updated the pull request incrementally with one additional commit \
since the last revision:
remove since tags
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/18373/files
- new: https://git.openjdk.org/jdk/pull/18373/files/b5589e40..7ef8b4ee
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=18373&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=18373&range=00-01
Stats: 2 lines in 2 files changed: 0 ins; 2 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/18373.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18373/head:pull/18373
PR: https://git.openjdk.org/jdk/pull/18373
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic