Its better if we can make this test run only in Linux as GTK is specific to it.
Other changes are fine.

Thanks,
Jay

> On 20-Dec-2019, at 10:31 PM, Phil Race <philip.r...@oracle.com> wrote:
> 
> Looks fine. Please use the amended and corrected  bug synopsis in the commit 
> message
> 
> -phil.
> 
> On 12/19/19 11:36 PM, Pankaj Bansal wrote:
>> Hi All,
>> 
>> Please review the following fix for jdk15.
>> 
>> Bug: 
>> https://bugs.openjdk.java.net/browse/JDK-8222759 
>> <https://bugs.openjdk.java.net/browse/JDK-8222759>
>>  
>> webrev:
>> http://cr.openjdk.java.net/~pbansal/8222759/webrev00/ 
>> <http://cr.openjdk.java.net/~pbansal/8222759/webrev00/>
>>  
>> Issue:
>> There are some unnecessary casts of javax.swing.plaf.synth.SynthStyleFactory 
>> to com.sun.java.swing.plaf.gtk.GTKStyleFactory in GTKLookAndFeel class. 
>> There is only one function “getStyle” being called after this cast, but that 
>> is declared in SynthStyleFactory as abstract and defined in GTKStyleFactory. 
>> So this function can be called without this cast too.
>> Because of this cast, if someone is trying to use a custom SynthStyleFactory 
>> with GTKLookAndFeel, there is a ClassCastException.
>>  
>> Fix:
>> Removed the cast as it is not required here. 
>>  
>> Testing:
>> I have run SwingSet2 with GTKLookAndFeel after this change. All works fine. 
>> Added testcase fails without fix and passes after the fix.
>> 
>> Regards,
>> Pankaj Bansal
>>  
> 
> 

Reply via email to