8388485: javax/swing/JInternalFrame/Test6505027.java fails with Cannot invoke "Object.getClass()" because "<local0>" is null - #32019
Conversation
…t invoke Object.getClass() because <local0> is null
|
👋 Welcome back psadhukhan! A progress list of the required criteria for merging this PR into |
|
@prsadhuk 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 30 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 |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
Webrevs
|
| try { | ||
| frame.setSelected(true); | ||
| } catch (PropertyVetoException ex) { | ||
| throw new Error("could not select internal frame", ex); |
There was a problem hiding this comment.
can we please use RuntimeException instead of Error - here and elsewhere.
There was a problem hiding this comment.
Since it was already using Error I used that to have consistency..Anyway, updated to use RTE
|
/integrate |
|
Going to push as commit 410a952.
Your commit was automatically rebased without conflicts. |
Test fails with NPE citing
which can happen when the internal frame has not received native focus yet, or the Robot click’s focus transfer has not completed. The test validates focus owner immediately after clicking cell (1,1).
Robot
waitForIdleanddelayis added after cell click to give time before current focus owner check is called.Also, explicitly activated the internal frame after it has been added to the desktop pane:
Also,
instanceofcheck is used instead ofcomponent.getClass().equals(JComboBox.class)because it handles null cleanly and does not reject a valid subclassAdditionally,
press()andvalidate()was called in separate EDT and main thread respectively which can cause issues like this, so made sure they are called in same thread as SwingTest calls static methods in main thread.Recurrent CI test execution is found to be ok.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32019/head:pull/32019$ git checkout pull/32019Update a local copy of the PR:
$ git checkout pull/32019$ git pull https://git.openjdk.org/jdk.git pull/32019/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 32019View PR using the GUI difftool:
$ git pr show -t 32019Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32019.diff
Using Webrev
Link to Webrev Comment