On Wed, 29 May 2024 11:51:34 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> When mapping methods and when they first appeared (by using the historical 
>> record built into javac) I use an id in the form of 
>> `method: <erased-return-descriptor> 
>> <binary-name-of-enclosing-class>.<method-name>(<ParameterDescriptor>)` so 
>> for covariant overrides in general, when the return type changes I consider 
>> it to be a new method.
>> 
>> Looking at the contents of the dictionnary:
>> This explicit constructor existed for a long time but then this new was 
>> added a new one was added in JDK 16
>> | Key | Value |
>> | ------------- | ------------- |
>> | `method: void 
>> javax.swing.plaf.basic.BasicSliderUI.<init>(javax.swing.JSlider):` | 9 |
>> | `method: void javax.swing.plaf.basic.BasicSliderUI.<init>():`  | 16 |
>> 
>> Note: JDK 9 is used as the "base" as that's how far I can reliably use the 
>> `--release` info, so if something was added in JDK 2,5.7,9. It has a value 
>> of "9" in the dictionnary. I mainly check for errors in newer code.
>
>> Hmm, the _explicit_ default constructor was added in JDK 16, but it was 
>> implicit before then. So I am not 100% sure what the right answer is - the 
>> same as the class, or when it was explicitly added.
> 
> 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.
> 
> At the same time, `BasicSliderUI(JSlider b)` has existed since at least 7, 
> the constructor is present in the history of the file. The history in GitHub 
> goes up to 1st December 2007 which corresponds to Java 7 timeline. I'm pretty 
> sure this constructor existed in previous releases, and you have to dig 
> further to find when it was added.
> 
> Very much likely, the constructor `BasicSliderUI(JSlider b)` was added when 
> the `BasicSliderUI` class was added. The class does not have `@since` tag, so 
> it's inherited from the package, isn't it? The same rule applies to the 
> constructor, doesn't it?

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?

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

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

Reply via email to