RFR: 8159451: [TEST_BUG] java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java [v2]

Alisen Chung duke at openjdk.java.net
Mon Nov 1 17:04:46 UTC 2021


On Fri, 29 Oct 2021 21:29:44 GMT, Phil Race <prr at openjdk.org> wrote:

>> Alisen Chung has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - reformat pixel check
>>  - removed debugging statement
>
> test/jdk/java/awt/Mixing/AWT_Mixing/OverlappingTestBase.java line 359:
> 
>> 357:     private static boolean isValidForPixelCheck(Component component) {
>> 358:         if ((component instanceof java.awt.Scrollbar)
>> 359:                 || (isMac && ((component instanceof java.awt.Button) || (component == null)))) {
> 
> "removed pixel check during EmbeddedFrame test from OverlappingTestBase."
> 
> Well you presumably can't pixel check a null component, but why is it null ?
> It seems like a test issue for it to be null. Can you explain how this happens ?
> 
> Also if this code *were* to stay it would be better formatted like
>  if ((component instanceof java.awt.Scrollbar) ||
>       (isMac && ((component instanceof java.awt.Button) ||
>       (component == null))))
>  {

When component is null it means EmbeddedFrame is currently being tested

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

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



More information about the client-libs-dev mailing list