-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
8313348: Fix typo in JFormattedTextField: 'it self' #15087
8313348: Fix typo in JFormattedTextField: 'it self' #15087
Conversation
👋 Welcome back aivanov! A progress list of the required criteria for merging this PR into |
@aivanov-jdk 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
|
@aivanov-jdk LGTM and since the Javadocs changes are trivial, I believe it doesn't require a CSR ? |
@honkar-jdk No, it doesn't require a CSR because it doesn't change the meaning. |
@@ -144,15 +144,15 @@ | |||
* Alternatively, you could invoke <code>commitEdit</code>, which would also | |||
* commit the value. | |||
* <p> | |||
* <code>JFormattedTextField</code> does not do the formatting it self, | |||
* <code>JFormattedTextField</code> does not do the formatting itself, |
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 like we have the same typo in some other files Like SwingSet2, etc. please double-check.
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.
We may… I didn't scan the entire code base, I was reading the code of JFormattedTextField
found the typo and decided to correct it. It's part of the Java SE API.
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 word ‘it self’ is present in HTML files in SwingSet2 and SwingSet3 in the excerpts from Micrographia. I'd rather not touch it, these are meant to be the exact text of the book, there are many misspellings or archaic spellings in the files.
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.
we have similar typo in the BasicTreeUI.java as well.
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.
we have similar typo in the BasicTreeUI.java as well.
Yes, it's there:
jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java
Lines 4084 to 4088 in b093880
// Preferably checkForClickInExpandControl could take | |
// the Event to do this it self! | |
if(SwingUtilities.isLeftMouseButton(e)) { | |
checkForClickInExpandControl(pressedPath, e.getX(), e.getY()); | |
} |
Yet it's not visible externally, it's visible only to those who read the code of the BasicTreeUI.Handler.handleSelection
method whereas the typo I'm addressing here is in the published API documentation for JFormattedTextField
.
It wasn't my goal to amend all the instances¹ where ‘it self’ is present in the code base — it takes much more time and effort².
It was supposed to be a quick and trivial bug report and fix which addresses this particular typo in the single file, JFormattedTextField.java
. A single file with a single change with four changed lines should've been reviewed quickly and smoothly.
For what it's worth, we have spent much more time discussing it…
¹ There are quite a few; yet they're mostly in hotspot code comments. Eventually, all could be amended.
² I've been on this journey with ‘a the’ in various combinations, it took about two months since its inception to its completion.
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.
For what it's worth, we have spent much more time discussing it…
Right, and I do not se a reason why other cases of the exactly same typo at least in java.desktop module is not fixed. Or do you suggest to create one more JBS issue and fix it? and then another one?
Yes, that's exactly what I suggest.
Unless you're committing to invest some considerable amount of time into cleaning up all the similar typos or other mistakes in the entire code base, doing a point-and-fix type of changes is a good trade-off, in my opinion, compared to ignoring them altogether. What I mean is limiting the change to one file, which is the smallest unit, makes it a quick fix: quick to submit a bug, quick to fix and quick to review and to integrate.
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.
That is wrong suggestion, if the one bug found in one place it is part of the fixing process to check that it does not exists in another one. Especially for typo it is easy to check. We already discussed this for one issue in scrollbars on windows, where the same bug was missed in the similar place.
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.
That is wrong suggestion, if the one bug found in one place it is part of the fixing process to check that it does not exists in another one. Especially for typo it is easy to check.
I don't think it is wrong, especially for typos. As I said, fixing typos in the entire code base, even if limited to the java.desktop
module requires considerable amount of time. Yet fixing a typo in a certain file is a trivial fix which is easy to fix and is quick to review.
We already discussed this for one issue in scrollbars on windows, where the same bug was missed in the similar place.
In that case, the problem could be more serious. As I explained in PR #14338, I missed this function was used in another component. At the same time, no test case has been found where functionality of ScrollBar is affected.
I have submitted the follow-up issues to clean it up.
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.
Anyway, I have updated BasicTreeUI
; in addition to fixing the typo there, I expanded the wildcard imports.
Do you have any more comments? @mrserb
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.
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.
Change looks fine and the change itself is trivial, so looks good overall. Hopefully the rest can be updated as they're encountered when those other files are touched. I'll keep a lookout myself
@aivanov-jdk 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 474 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
That's what I usually do. If I see a problem in a file, a class, I tend to report it and fix it. Doing it quickly is preferable because I'm not always ready to spend more time into looking around to address other instances of the same problem.
Thanks! @DamonGuy Gradually, even if one file at a time, we'll get to a cleaner code base. |
@aivanov-jdk This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
/integrate |
Going to push as commit a1c9587.
Your commit was automatically rebased without conflicts. |
@aivanov-jdk Pushed as commit a1c9587. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
A trivial change: ‘it self’ → ‘itself’.
In addition to it, I added a comma after ‘Similarly’ where it starts a sentence.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15087/head:pull/15087
$ git checkout pull/15087
Update a local copy of the PR:
$ git checkout pull/15087
$ git pull https://git.openjdk.org/jdk.git pull/15087/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 15087
View PR using the GUI difftool:
$ git pr show -t 15087
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15087.diff
Webrev
Link to Webrev Comment