Hi All,

 

Please review the fix for JDK 10.

 

Bug:

https://bugs.openjdk.java.net/browse/JDK-8190348

 

Webrev:

http://cr.openjdk.java.net/~pbansal/8190348/webrev.00/

 

Issue:

The test fails with or without HiDPI with Exception. 

Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 
bounds = java.awt.Rectangle[x=74,y=40,width=181,height=185] loc = 
java.awt.Point[x=274,y=240] background loc = 100, 100 so middle point over 
background is 264, 232 Oval is not opaque in the middle point (364, 332, 
java.awt.Color[r=51,g=51,b=51]) 

 

Fix:

The test case creates a class PerPixelTranslucentCanvas which drives from 
Common class. It has a instance variable OVAL_COLOR. In the constructor, it is 
calling super class constructor which in turn calls createSwingComponents 
function which is overridden by PerPixelTranslucentCanvas. This function uses 
the OVAL_COLOR. The instance variables are loaded before the class 
construction, but after the super constructor has been called. As the variable 
is not static, it is not yet loaded and null is used. So this variable should 
be static, so that it is created on class loading.

There are variables BG_COLOR and FG_COLOR in common class which are static as 
well.

 

Also added an addition @run to run the test at HiDPI also like other tests in 
the same folder.

 

Regards,

Pankaj Bansal

 

Reply via email to