[jdk11u-dev] RFR: 8306575: Clean up and open source four Dialog related tests

Martin Doerr mdoerr at openjdk.org
Thu Sep 7 08:25:46 UTC 2023


On Fri, 18 Aug 2023 06:00:38 GMT, Andrew Lu <andrewlu at openjdk.org> wrote:

> I backport this for parity with 11.0.21-oracle.
> 
> test/jdk/java/awt/Dialog/DialogLocationTest.java
> "random.nextInt(insetX, width - 300)" is modified as random.nextInt(int origin, int bound) is not supported in jdk11.
> 
> "System.out.println(message.formatted(newX, newY, eventLoc.x, eventLoc.y, eventLoc.x - newX, eventLoc.y - newY))"
> is also modified as String.formatted(Object... args) is not supported in jdk11.

test/jdk/java/awt/Dialog/DialogLocationTest.java line 105:

> 103:         for (i = 0; i < 100; i++) {
> 104:             newX = random.nextInt(width - 300) +  insetX;
> 105:             newY = random.nextInt(height - 400) + insetY;

Your version will get a number between insetX and insetX+width-300.
The original change: between insetX and width-300.

-------------

PR Review Comment: https://git.openjdk.org/jdk11u-dev/pull/2088#discussion_r1318261304


More information about the jdk-updates-dev mailing list