Hi Jay,

 

I have done the changes you suggested.

webrev: http://cr.openjdk.java.net/~pbansal/8222759/webrev01/

 

Regards,

Pankaj

 

From: Jayathirth D v 
Sent: Monday, December 23, 2019 12:08 PM
To: Pankaj Bansal
Cc: swing-dev@openjdk.java.net
Subject: Re: <Swing Dev> [15] RFR JDK-8222759: 
com.sun.java.swing.plaf.gtk.GTKLookAndFeel Unneccessary casts to GTKStyleFactory

 

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 <HYPERLINK 
"mailto:philip.r...@oracle.com"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

 

webrev:

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