RFR: 8017175: [TESTBUG] javax/swing/JPopupMenu/4634626/bug4634626.java sometimes failed on mac [v2]

Sergey Bylokhov serb at openjdk.java.net
Thu Oct 28 19:30:10 UTC 2021


On Thu, 28 Oct 2021 09:21:27 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>>> Creation of component like instantiation?
>> 
>> Yes, every access to the Swing components:
>> https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/package-summary.html
>> 
>>> That seems to be wrong. We always had the notion of realized component vs non-realized. Before a component is added to the realized container or becomes realized on its own it should not post any events on EDT. 
>> 
>> I think that was changed 15 years ago or so somewhere before the release of the JDK5 the spec was updated:
>> https://bugs.openjdk.java.net/browse/JDK-5042754?focusedCommentId=12216623&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-12216623
>> 
>> And the text about "realized component" was removed from the thread Swing tutorial somewhere in 2004, so we even do not use this term.
>
>> I think that was changed 15 years ago or so somewhere before the release of the JDK5 the spec was updated
> 
> Ok, i will fix that in this particular test for the sake of getting a closure on it but it seems wrong to me on so many levels. And it is no surprise so many automated Swing tests are failing intermittently  - they were written according the old notion of the Swing component lifecycle and was never updated to reflect the backwards incompatible change we accidentally did. Shame. But that's a topic to discuss and dig deeper later.

We did not change the behavior of the Swing, it works the same before and after that spec update. That tests were broken from the beginning and this is why they are unstable, and this is why the requirements were changed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6104



More information about the client-libs-dev mailing list