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

Nizar Benalla nbenalla at openjdk.org
Mon Jun 3 23:37:07 UTC 2024


On Wed, 15 May 2024 03:38:29 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:

>> If you're currently reviewing this PR, thank you!
>> Most fixes here are according to the reports by the since checker tool in #18934 and are pretty simple.
>> 
>> To make reviewing easier
>> - `BasicSliderUI` has the constructor `public BasicSliderUI(JSlider b)` for a long time so the default constructor (without parameters) didn't exist until JDK 16
>> 
>> For the `package-info` files, it is pretty hard to find source code of JDK 1-5 so I used the `grep` command to find the oldest instance of an `@since` in those packages.
>> 
>> I found instances of `@since 1.1` in the other packages but `javax/swing/plaf/synth/package-info.java` might be worth checking as most classes there had no `@since`.
>
> Nizar Benalla has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Swing was added in JDK 1.2

here is the `@since` checker tool report for `java.desktop`


        SinceChecker java.desktop
STDERR:
method: void java.awt.geom.Path2D.Double.trimToSize(): `@since` version is 9 instead of 10
method: void java.awt.geom.Path2D.Float.trimToSize(): `@since` version is 9 instead of 10
Unable to retrieve `@since` for Package: package: java.beans
Unable to retrieve `@since` for Package: package: javax.swing
method: void javax.swing.DefaultListModel.addAll(java.util.Collection): `@since` version is 9 instead of 11
method: void javax.swing.DefaultListModel.addAll(int,java.util.Collection): `@since` version is 9 instead of 11
method: void javax.swing.JSlider.AccessibleJSlider.stateChanged(javax.swing.event.ChangeEvent): `@since` version is 9 instead of 16
method: int javax.swing.JSlider.AccessibleJSlider.getAccessibleActionCount(): `@since` version is 9 instead of 17
method: java.lang.String javax.swing.JSlider.AccessibleJSlider.getAccessibleActionDescription(int): `@since` version is 9 instead of 17
method: boolean javax.swing.JSlider.AccessibleJSlider.doAccessibleAction(int): `@since` version is 9 instead of 17
method: void javax.swing.DefaultComboBoxModel.addAll(java.util.Collection): `@since` version is 9 instead of 11
method: void javax.swing.DefaultComboBoxModel.addAll(int,java.util.Collection): `@since` version is 9 instead of 11
method: void javax.swing.plaf.basic.BasicSliderUI.<init>(): `@since` version is 9 instead of 16
Unable to retrieve `@since` for Package: package: javax.swing.plaf.synth
field: javax.swing.text.DefaultEditorKit:beginLineUpAction: `@since` version is 9 instead of 20
field: javax.swing.text.DefaultEditorKit:endLineDownAction: `@since` version is 9 instead of 20
java.lang.Exception: The `@since` checker found 16 problems
        at SinceChecker.checkModule(SinceChecker.java:262)
        at SinceChecker.main(SinceChecker.java:123)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
        at java.base/java.lang.Thread.run(Thread.java:1575)

JavaTest Message: Test threw exception: java.lang.Exception
JavaTest Message: shutting down test


TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.Exception: The `@since` checker found 16 problems

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

PR Comment: https://git.openjdk.org/jdk/pull/19192#issuecomment-2146298763


More information about the client-libs-dev mailing list