RFR: 8334580: Deprecate no-arg constructor BasicSliderUI() for removal [v2]

Alexey Ivanov aivanov at openjdk.org
Fri Jun 21 15:01:10 UTC 2024


On Fri, 21 Jun 2024 12:11:21 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> The no-arg constructor BasicSliderUI() was added under [JDK-8250852](https://bugs.openjdk.org/browse/JDK-8250852) by mistake. This constructor should be deprecated for removal in future release
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add forRemoval

Now that I looked at the code more thoroughly, the no-arg constructor makes more sense actually.

https://github.com/openjdk/jdk/blob/c41293a70834a79c79e859ebcdb8869884ac87dc/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSliderUI.java#L202-L207

I was under impression that `BasicSliderUI(JSlider b)` did use its parameter but it doesn't.

Should we keep the new constructor and deprecate the *old* one?

Should we remove the new constructor and keep the things as they've always been?

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

PR Comment: https://git.openjdk.org/jdk/pull/19819#issuecomment-2182916810


More information about the client-libs-dev mailing list