RFR: 8332103: since-checker - Add missing @ since tags to java.desktop [v2]

Alexey Ivanov aivanov at openjdk.org
Tue Jun 4 16:06:20 UTC 2024


On Tue, 4 Jun 2024 00:02:56 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:

>> It seems that BasicSliderUI() was added by the mistake? it was not mentioned in the bug report...Seems it is too late to delete it?
>
> I'm sorry but `method: void javax.swing.plaf.basic.BasicSliderUI.<init>()` refers to the constructor, 
>  as I use [this method](https://docs.oracle.com/en/java/javase/22/docs/api/java.compiler/javax/lang/model/element/ExecutableElement.html#getSimpleName()) to get a method's name.
> 
> I am saying that there was no default constructor before JDK 16 as it doesn't appear in the compiler's historical data until then and therefore warrants an `@since`
> 
> I am stealing my colleagues words but here is the general rule for when we want to add an `@since` until we publish a doc with rules for `@since`
> 
>> As a practical rule for deciding whether any declaration is new or not, imagine writing a test program that refers to the most specific form of the declaration. If that test program does not compile on JDK version N-1 and does compile on version N, then it warrants having `@since N`. Put another way, `@since N` should identify the first release in which the declaration can be used in the given form

> It seems that BasicSliderUI() was added by the mistake? it was not mentioned in the bug report...Seems it is too late to delete it?

I agree. It shouldn't have been added.

Instead of adding `@since`, the constructor should be removed. It requires a CSR.

The longer it exists, the more chances there are that it's used.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19192#discussion_r1626272799


More information about the client-libs-dev mailing list