<div dir="ltr"><div><div><div><div><div><div><div>Hello,<br><br></div>the patch for JDK-8043869 (introduced with change <a href="http://cr.openjdk.java.net/~alexsch/8043869/webrev.03/">http://cr.openjdk.java.net/~alexsch/8043869/webrev.03/</a>) contains a bug.<br></div>The java.awt.SplashScreen#getSize returns an incorrect height value when a hi dpi splash screen is shown. There is no bug available yet in the public JIRA bug tracker, although I submitted a bug report for this through <a href="http://bugs.java.com/">http://bugs.java.com/</a> .<br><br></div>The following patch fixes that problem, and updates the test to detect the problem:<br><br>diff --git a/src/share/classes/java/awt/SplashScreen.java b/src/share/classes/java/awt/SplashScreen.java<br>--- a/src/share/classes/java/awt/SplashScreen.java<br>+++ b/src/share/classes/java/awt/SplashScreen.java<br>@@ -250,7 +250,7 @@<br>             assert scale > 0;<br>             if (scale > 0 && scale != 1) {<br>                 bounds.setSize((int) (bounds.getWidth() / scale),<br>-                        (int) (bounds.getWidth() / scale));<br>+                        (int) (bounds.getHeight() / scale));<br>             }<br>             return bounds;<br>         }<br>diff --git a/test/java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java b/test/java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java<br>--- a/test/java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java<br>+++ b/test/java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java<br>@@ -93,6 +93,15 @@<br>         int screenX = (int) splashBounds.getCenterX();<br>         int screenY = (int) splashBounds.getCenterY();<br> <br>+        if(splashBounds.width != IMAGE_WIDTH){<br>+            throw new RuntimeException(<br>+                    "SplashScreen#getBounds has wrong width");<br>+        }<br>+        if(splashBounds.height != IMAGE_HEIGHT){<br>+            throw new RuntimeException(<br>+                    "SplashScreen#getBounds has wrong height");<br>+        }<br>+        <br>         Robot robot = new Robot();<br>         Color splashScreenColor = robot.getPixelColor(screenX, screenY);<br><br><br></div>Diff was created against this revision: <a href="http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/rev/4d6c03fb1039">http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/rev/4d6c03fb1039</a><br><br></div>Note that this is my first contribution. I think I followed all the guidelines from <a href="http://openjdk.java.net/contribute/">http://openjdk.java.net/contribute/</a> . Please let me know if I did anything wrong.<br><br></div>Kind regards,<br><br></div>Robin<br></div>