On Wed, 15 May 2024 03:38:29 GMT, Nizar Benalla <[email protected]> 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 Referring to the [discussion about BasicSliderUI() constructor](https://github.com/openjdk/jdk/pull/19192#discussion_r1600699721): > > Hmm, the _explicit_ default constructor was added in JDK 16, but it was > > implicit before then. > > I believe there was *no default* constructor in `BasicSliderUI()` because > there was a constructor with a parameter `BasicSliderUI(JSlider b)`. > > Thus, this case seem to be correct `BasicSliderUI()` is available since 16. > > > It seems that `BasicSliderUI()` was added by the mistake? it was not > > mentioned in the bug report... > > [[JDK-8250852](https://bugs.openjdk.org/browse/JDK-8250852)] 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. Taking all these points into account all these points above, _adding `@since 16` to the no-argument constructor of `BasicSliderUI()` is **correct**_. How do we remove this constructor? Can it be removed right away? Should it be deprecated for several releases before it's removed? @prrace @prsadhuk @mrserb src/java.desktop/share/classes/javax/swing/plaf/synth/package-info.java line 143: > 141: * }</pre> > 142: * > 143: * @since 1.5 This is correct, I verified the `javax.swing.plaf.synth` package is available in [Java 5](https://docs.oracle.com/javase/1.5.0/docs/api/javax/swing/plaf/synth/package-summary.html) but it wasn't in Java 1.4. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19192#issuecomment-2162815600 PR Review Comment: https://git.openjdk.org/jdk/pull/19192#discussion_r1636329855
