-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8332103: since-checker - Add missing @ since tags to java.desktop #19192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👋 Welcome back nizarbenalla! A progress list of the required criteria for merging this PR into |
@nizarbenalla This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TejeshR13, @aivanov-jdk) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@nizarbenalla The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did verify the updates against the release versions and looks good to me.
@@ -149,5 +149,7 @@ | |||
* </ul> | |||
* | |||
* @serial exclude | |||
* | |||
* @since 1.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't right. Where did you get this from ?
Swing only became part of the JDK in JDK 1.2
It was an unbundled library before then.
If you find any @SInCE 1.1 tags in the Swing API they are a mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad then, this is a mistake.
src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSliderUI.java
Show resolved
Hide resolved
I'm not sure I understand the methodology here. |
As I'm using the historical data built into
but for older code you can only guess "Element: X existed before JDK 10". So I was left to check on my own, and made a mistake. |
Why is it? There's history beyond 10 and 9, yet accessing it requires more effort. In addition to that, old JDK releases are available in an archive so that you can verify if a method existed in a certain release. If all the methods need |
As I've explained before, a program relying on the historical data built into To fix old code, we would need to find a new way to map elements. I don't think this would need to be added to the checker tool as checking old code doesn't need to run regularly. It can be a one time script, fix it once and be done with this. It's out of scope for my current work. The good thing is that once these tags (in this PR) are fixed, this will no longer be an issue and the errors reported will be clear and simple. As we would only be dealing with missing/wrong information in current releases. I agree I should've looked more, because the |
@since
tags to java.desktop
@since
tags to java.desktop
here is the report from the
|
@since
tags to java.desktop
In JDK 10, a new method
|
/** | ||
* @since 10 | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure it's required…
If it is, you should also add explicit {@inheritDoc}
:
/** | |
* @since 10 | |
*/ | |
/** | |
* {@inheritDoc} | |
* | |
* @since 10 | |
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
You don't need an explicit
{@inheritDoc}
although you may choose to do so for explicit clarity. -
@since
can be omitted for a member if the value would be the same as on the enclosing class -
When present,
@since
on a method should indicate the first release in which the method is available for use on that class, with that VM signature (includes args and return type)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for clarification, @jonathan-gibbons. So, @since
is required here.
I prefer an explicit {@inheritDoc}
, this way the javadoc comment doesn't look empty. I'm fine without adding {@inheritDoc}
though.
Referring to the discussion about BasicSliderUI() constructor:
Taking all these points into account all these points above, adding How do we remove this constructor? Can it be removed right away? Should it be deprecated for several releases before it's removed? |
* | ||
* @since 1.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct, I verified the javax.swing.plaf.synth
package is available in Java 5 but it wasn't in Java 1.4.
Just delete it in all versions of 17+? |
Now it is part of Java 17 and 21. It can't be removed from these releases, I believe. Can it be removed quickly from the upcoming JDK 23? Probably, not as well. |
I've submitted the follow-up bugs to deal with the no-arg constructor
The plan is to deprecate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified all the added @since
declarations, I found no inconsistencies.
The no-arg constructor BasicSliderUI()
was added in 16, therefore @since 16
is correct. The constructor will be deprecated and removed by the follow-up bugs.
Thank you Alexey and Tejesh for your reviews! /integrate |
@nizarbenalla |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR still looks good for me.
Yet I suggest waiting until #19819 is integrated. It will facilitate reviewing the CSR and backporting that change to jdk23.
Once PR 19819 is integrated, you'll have to merge master into your PR branch and resolve the conflict.
Thank you for your understanding.
Let me add a new commit to remove the sponsor label |
Thank you! |
# Conflicts: # src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSliderUI.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Thank you for waiting and then resolving the conflict.
Thank you Aleksei! /Integrate |
/integrate |
@nizarbenalla |
/sponsor |
Going to push as commit 8591eff.
Your commit was automatically rebased without conflicts. |
@aivanov-jdk @nizarbenalla Pushed as commit 8591eff. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
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 constructorpublic BasicSliderUI(JSlider b)
for a long time so the default constructor (without parameters) didn't exist until JDK 16For the
package-info
files, it is pretty hard to find source code of JDK 1-5 so I used thegrep
command to find the oldest instance of an@since
in those packages.I found instances of
@since 1.1
in the other packages butjavax/swing/plaf/synth/package-info.java
might be worth checking as most classes there had no@since
.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19192/head:pull/19192
$ git checkout pull/19192
Update a local copy of the PR:
$ git checkout pull/19192
$ git pull https://git.openjdk.org/jdk.git pull/19192/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19192
View PR using the GUI difftool:
$ git pr show -t 19192
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19192.diff
Webrev
Link to Webrev Comment