-
Notifications
You must be signed in to change notification settings - Fork 541
8293587: Fix mistakes in FX API docs #1025
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
8293587: Fix mistakes in FX API docs #1025
Conversation
|
👋 Welcome back nlisker! A progress list of the required criteria for merging this PR into |
|
Integrating can wait until a bit before the release to allow for more mistakes to be included. |
Webrevs
|
|
/reviewers 2 |
|
@kevinrushforth |
hjohn
left a comment
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, I added some more minor suggestions as well.
modules/javafx.controls/src/main/java/javafx/scene/control/ListView.java
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java
Outdated
Show resolved
Hide resolved
kevinrushforth
left a comment
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.
Other than John's comments, this looks good to me. I noted one more possible formatting change and an unrelated follow-up cleanup issue I plan to file.
| private void processDropEnd(DragEvent de) { | ||
| if (source == null) { | ||
| System.out.println("Scene.DnDGesture.processDropEnd() - UNEXPECTD - source is NULL"); | ||
| System.out.println("Scene.DnDGesture.processDropEnd() - UNEXPECTED - source is NULL"); |
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 reminds me... I see that this warning is printed to System.out. I plan to file a follow-up cleanup bug (not for jfx20) to fix this, here and in other places, since runtime warnings should be printed to System.err (or else logged using the platform logger, but that would be a larger change, so I expect we'll opt for the simple substitution).
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 never understood when something should be logged vs. printed. And do we ever print to out?
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 wish we were using logging...
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 aren't very consistent on this. Most of the places where we produce warnings, or where we provide verbose output, are done by printing. At a minimum, those should go to System.err rather than System.out. Unless there is an API whose expected result is to print something to System.out, a library really shouldn't print to System.out (as opposed to a test or a demo app, where it's fine). So the only places I would expect to see it in the library -- meaning source code under modules/javafx.*/src/main/java/ -- would be in examples in javadoc comments.
We could file a second follow-up issue (RFE) to consider changing some of our print statements to use logging.
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.
Some investigation is needed if source can ever be null in such cases. I think some of these are to inform the programmer (not the user) something unexpected happens, in which case it should be an assert or exception. If it then ever does happen, it should be fixed.
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 drag/drop code is full of what looks like asserts that are just dumped to System.err. It looks like left overs that helped during development of the underlying state machine, but it shouldn't get in such states normally. When I run the tests, none of the exceptional cases or System.err code has any coverage which can be a sign that these cases can't be reached.
…tView.java Co-authored-by: John Hendrikx <john.hendrikx+github@gmail.com>
…ow.java Co-authored-by: John Hendrikx <john.hendrikx+github@gmail.com>
…ow.java Co-authored-by: John Hendrikx <john.hendrikx+github@gmail.com>
…ow.java Co-authored-by: John Hendrikx <john.hendrikx+github@gmail.com>
| private void processDropEnd(DragEvent de) { | ||
| if (source == null) { | ||
| System.out.println("Scene.DnDGesture.processDropEnd() - UNEXPECTD - source is NULL"); | ||
| System.out.println("Scene.DnDGesture.processDropEnd() - UNEXPECTED - source is NULL"); |
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 wish we were using logging...
modules/javafx.controls/src/main/java/javafx/scene/control/ListView.java
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java
Outdated
Show resolved
Hide resolved
andy-goryachev-oracle
left a comment
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.
definitely an improvement, thank you.
|
@nlisker 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 ➡️ To integrate this PR with the above commit message to the |
|
/integrate |
|
Going to push as commit 7bf2372.
Your commit was automatically rebased without conflicts. |
Fixes and cleanup in the areas in the linked issue.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jfx pull/1025/head:pull/1025$ git checkout pull/1025Update a local copy of the PR:
$ git checkout pull/1025$ git pull https://git.openjdk.org/jfx pull/1025/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1025View PR using the GUI difftool:
$ git pr show -t 1025Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1025.diff