<Swing Dev> JDK-8190348: [TESTBUG] Test javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentCanvas.java fails
prasanta.sadhukhan at oracle.com
Fri Nov 17 05:52:44 UTC 2017
On 11/16/2017 4:28 PM, Pankaj Bansal wrote:
> Hi All,
> Please review the fix for JDK 10.
> 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])
> 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.
> Pankaj Bansal
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swing-dev