<AWT Dev> <Awt Dev> [9] Review Request for 8011616: JWindow.getLocation and JWindow.getLocationOnScreen return different values on Unity

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Sep 21 15:41:28 UTC 2015


18.09.2015 11:37, Semyon Sadetsky wrote:
> The updated webrev: 
> http://cr.openjdk.java.net/~ssadetsky/8011616/webrev.02/

I looked at the test the first time. Is the the order of checks inside 
it is intentional?:

   52         Point location1 = window.getLocation();
   53         Point location2 = window.getLocationOnScreen();
   54         window.setLocation(10000, 10000);
   55
   56         if (!location1.equals(location2)) {
   57             window.dispose();
   58             throw new RuntimeException("getLocation is different");
   59         }

The call to "window.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE)" in testLocation() is not validated at all. Probably setLocation() was assumed?

It seems that in some cases the window is not disposed before an exception.

-- 
Best regards, Sergey.



More information about the awt-dev mailing list