<Swing Dev> Review Request: JDK-7012008 JDesktopPane - Wrong background color with Win7+WindowsLnf

Alexey Ivanov alexey.ivanov at oracle.com
Wed Mar 9 10:28:11 UTC 2016


Hi Prem,

The fix itself looks good.
Yet I have some questions to the test.

Could you please place the comment with @test tag and other before the 
class declaration rather than before imports?
Could you place asterisk in front of each line in this comment block? It 
will look consistent with Java style doc comments and other tests.

Do you really need to create UI?
Wouldn't it be enough to create JDesktopPane and check its background 
color? I believe it will significantly simplify the test.

I think converting Color to ColorUIResource is unnecessary here. 
ColorUIResource is Color decorated with UIResource interface: 
Color.equals method does not take this distinction into account.

In main(), you can create and initialize the LaF array in one go.

In executeTest(), you should dispose mainFrame on EDT rather than on 
main thread. I'd recommend using finally block in run() to dispose 
mainFrame: it will handle both success and failure.

Additionally, you access variables from different threads. The way the 
code is written now does not guarantee memory consistency between the 
different threads, thus the test could fail or pass sporadically.

And I agree with Semyon, the test should fail on other platforms, you 
should just skip the test.


Regards,
Alexey

On 09.03.2016 9:59, Prem Balakrishnan wrote:
>
> Hi*,*
>
> Please review fix for JDK9,
>
> *Bug:*https://bugs.openjdk.java.net/browse/JDK-7012008**
>
> *Webrev:*http://cr.openjdk.java.net/~arapte/prem/7012008/webrev.00/ 
> <http://cr.openjdk.java.net/%7Earapte/prem/7012008/webrev.00/>
>
> *Issue:*
>
> JDesktopPane - Wrong background color with Win7+WindowsLnf
>
> *Cause:*
>
> Desktop.background property set to "win.desktop.backgroundColor"
>
> *Fix:*
>
> Changed Desktop.background property  to "win.mdi.backgroundColor"
>
> Regards,
> Prem
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20160309/feb8e39f/attachment.html>


More information about the swing-dev mailing list