-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8359430: Test 'javax/swing/plaf/windows/bug4991587.java' automatically failed on Windows 2025 x64 with message "Failed. Compilation failed: Compilation failed" #25883
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
Open
DamonGuy
wants to merge
11
commits into
openjdk:master
Choose a base branch
from
DamonGuy:8359430/buttonUiTest
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3
−20
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c51406a
Initial commit for backout
DamonGuy a98fb87
Merge branch 'master' of github.com:DamonGuy/jdk
DamonGuy 947f73d
Merge branch 'master' of github.com:DamonGuy/jdk
DamonGuy b17e483
Merge branch 'master' of github.com:DamonGuy/jdk
DamonGuy 9583f8a
Merge branch 'master' of github.com:DamonGuy/jdk
DamonGuy d76baf5
Merge branch 'master' of github.com:DamonGuy/jdk
DamonGuy abd6ab9
Merge branch 'master' of github.com:DamonGuy/jdk
DamonGuy 0824a98
Merge branch 'master' of github.com:DamonGuy/jdk
DamonGuy 781a2ba
Merge branch 'master' of github.com:DamonGuy/jdk
DamonGuy e1d4caa
Initial commit
DamonGuy 6325561
Update test to not extend ButtonUI
DamonGuy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Use composition here: extend
BasicButtonUI
, create aWindowsButtonUI
¹ object and forward all the methods² to the instance ofWindowsButtonUI
. In thepaintText
method, draw the rectangle and then call the implementation of yourWindowsButtonUI
.¹ Use
WindowsButtonUI.createUI
to create an instance.² All the overridden methods in
WindowsButtonUI
.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.
It would be good if we could eliminate the reference to WindowsButtonUI. It might also be useful to check the behavior across all L&Fs.
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.
But we want the regression to reproduce the original problem. The problem was specific to
WindowsButtonUI
, inWindowsGraphicsUtils
according to comments in the bug.It may be impossible to reproduce the problem without referencing
WindowsButtonUI
. If it's possible, I'm all for it.The bug was in Windows L&F, I don't think it's applicable to other L&F.
On Windows, the disabled text was painted with “shadow” with offset of (1, 1) which could be painted over another part of the button. Other L&Fs are free to paint the button differently.
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 should be checked on old jdk build.
It depends on how these offsets were used previously, maybe we displayed the text outside the button, which shouldn't happen for all L&Fs.
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.
Exactly!
We have to reproduce the original bug first to see what was wrong.
Yes, but…
This specific bug was for Windows only, the fix was presumably in Windows-only code, this is why I don't care much about other L&F.
Even if the text was displayed outside of the button, it was Windows-specific.
Until we understand what the original bug was, it is too early to extend the test to other L&F.
Additionally, it's a manual test. If the test is automated, it makes more sense to test for all L&Fs; for a manual test, I'd rather avoid testing in other L&F because the bug never existed there.
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.
It does not matter where the bug was if it can be reproduced via the public API. It is quite common for a test written for one platform later catch a bug on another.
For a manual test it is unnecessary but I think it should be possible to automate. And checking of all L&F depends only on how the bug can be triggered and what is wrong.