<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi All,<div class="">Please review the following fix for jdk16.</div><div class=""><br class=""></div><div class="">Bug : <a href="https://bugs.openjdk.java.net/browse/JDK-8249674" class="">https://bugs.openjdk.java.net/browse/JDK-8249674</a></div><div class="">Webrev : <a href="http://cr.openjdk.java.net/~trebari/swing/8249674/webrev00/" class="">http://cr.openjdk.java.net/~trebari/swing/8249674/webrev00/</a></div><div class=""><br class=""></div><div class="">This is a modified fix for <a href="https://bugs.openjdk.java.net/browse/JDK-8041701" class="">https://bugs.openjdk.java.net/browse/JDK-8041701</a> </div><div class="">which caused some internal test to fail.</div><div class=""><br class=""></div><div class=""><div class="" style="orphans: 2; widows: 2;">Issue : UI properties <span class="" style="background-color: rgb(255, 255, 255);"><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span class="">“</span>Tree.leafIconâ€, </font></span><span class="" style="background-color: rgb(255, 255, 255);"><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span class="">“</span>Tree.closedIconâ€, </font></span><span class="" style="background-color: rgb(255, 255, 255);"><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span class="">“</span>Tree.openIconâ€,</font></span></div><div class="" style="orphans: 2; widows: 2;"><span class="" style="background-color: rgb(255, 255, 255);"><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""> </font></span><span class="" style="background-color: rgb(255, 255, 255);"><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span class="">“</span>Tree.selectionForeground†..etc </font></span><span class="" style="color: rgb(23, 43, 77); font-family: "DejaVu Sans", sans-serif; background-color: rgb(255, 255, 255);">are supposed to be instances of UIResource </span></div><div class="" style="orphans: 2; widows: 2;"><span class="" style="color: rgb(23, 43, 77); font-family: "DejaVu Sans", sans-serif; background-color: rgb(255, 255, 255);">if they are defined by LAF. </span></div></div><div class="" style="orphans: 2; widows: 2;"><span class="" style="color: rgb(23, 43, 77); font-family: "DejaVu Sans", sans-serif; background-color: rgb(255, 255, 255);"><br class=""></span></div><div class="" style="orphans: 2; widows: 2;"><span class="" style="font-family: "DejaVu Sans", sans-serif;"><div class="" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); caret-color: rgb(0, 0, 0); font-family: Helvetica;"><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span class="" style="caret-color: rgb(23, 43, 77);">In Nimbus LAF all the above properties are defined , but none of them implement </span></font></div><div class="" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); caret-color: rgb(0, 0, 0); font-family: Helvetica;"><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span class="" style="caret-color: rgb(23, 43, 77);">UIResource, this causes them to</span></font><span class="" style="caret-color: rgb(23, 43, 77); color: rgb(23, 43, 77); font-family: "DejaVu Sans", sans-serif;"> persists when LAF is changed. </span></div><div class="" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); caret-color: rgb(0, 0, 0); font-family: Helvetica;"><span class="" style="caret-color: rgb(23, 43, 77); color: rgb(23, 43, 77); font-family: "DejaVu Sans", sans-serif;">This leaves artefacts when switching from nimbus to other LAFs.</span></div><div class="" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); caret-color: rgb(0, 0, 0); font-family: Helvetica;"><span class="" style="caret-color: rgb(23, 43, 77); color: rgb(23, 43, 77); font-family: "DejaVu Sans", sans-serif;"><br class=""></span></div><div class="" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); caret-color: rgb(0, 0, 0); font-family: Helvetica;"><span class="" style="caret-color: rgb(23, 43, 77); color: rgb(23, 43, 77); font-family: "DejaVu Sans", sans-serif;">Fix : </span><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span class=""> Fix is to make use of UIResource for the above</span></font><span style="color: rgb(23, 43, 77); font-family: "DejaVu Sans", sans-serif;" class=""> </span><span style="color: rgb(23, 43, 77); font-family: "DejaVu Sans", sans-serif;" class="">mentioned</span><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span class=""> uiProperties.</span></font></div><div class="" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); caret-color: rgb(0, 0, 0); font-family: Helvetica;"><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span class="">Making NimbuIcon implements the UIResource was working fine earlier </span></font></div><div class="" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); caret-color: rgb(0, 0, 0); font-family: Helvetica;"><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span class="">so keeping the change same.</span></font></div><div class="" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); caret-color: rgb(0, 0, 0); font-family: Helvetica;"><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span class=""><br class=""></span></font></div><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica;"><font color="#172b4d" face="DejaVu Sans, sans-serif" class="" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span class="">The second part of the earlier fix "</span></font><span style="background-color: rgb(255, 255, 255);" class="">class DerivedColor extends Color implements UIResource"</span></div></span><div class="">caused the internal test failure,</div><div class=""><br class=""></div><div class="">So changed this fix to keep the DerivedColor class same and for the uiProperties </div><div class=""><span style="caret-color: rgb(23, 43, 77); color: rgb(23, 43, 77); font-family: "DejaVu Sans", sans-serif; background-color: rgb(255, 255, 255);" class="">Tree.selectionForeground†..etc use the </span>UIResource<br class=""><span style="caret-color: rgb(23, 43, 77); color: rgb(23, 43, 77); font-family: "DejaVu Sans", sans-serif; background-color: rgb(255, 255, 255);" class="">class that is inside the DerivedColor. These changes were made in skin.laf file.</span></div><div class=""><span style="caret-color: rgb(23, 43, 77); color: rgb(23, 43, 77); font-family: "DejaVu Sans", sans-serif; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span style="caret-color: rgb(23, 43, 77);" class="">Testing : Tested on all three </span></font></span><font color="#172b4d" face="DejaVu Sans, sans-serif" class="">platform, and all internal tests.Link is in JBS.</font></div><div class=""><font color="#172b4d" face="DejaVu Sans, sans-serif" class="">In test also added the part which was the reason of revert of earlier fix</font>.</div><div class="">The test fails with the fix of 8041701 and passes with the current fix.</div><div class=""><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><br class=""></font></div><div class=""><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><br class=""></font></div><div class=""><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span style="caret-color: rgb(23, 43, 77);" class="">Regards</span></font></div><div class=""><font color="#172b4d" face="DejaVu Sans, sans-serif" class=""><span style="caret-color: rgb(23, 43, 77);" class="">Tejpal</span></font></div></div></div></body></html>