From e54d2a4f81ab89ea39652370d37910d18d57d4db Mon Sep 17 00:00:00 2001 From: Kevin Rushforth Date: Thu, 14 Jul 2022 16:01:38 +0000 Subject: [PATCH 01/16] 8289835: Change JavaFX release version to 20 Reviewed-by: arapte --- .jcheck/conf | 2 +- build.properties | 6 +++--- .../java/test/com/sun/javafx/runtime/VersionInfoTest.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.jcheck/conf b/.jcheck/conf index ee49384c2b9..ace78def6d9 100644 --- a/.jcheck/conf +++ b/.jcheck/conf @@ -24,7 +24,7 @@ [general] project=openjfx jbs=jdk -version=openjfx19 +version=openjfx20 [repository] tags=(jdk-){0,1}([1-9]([0-9]*)(\.(0|[1-9][0-9]*)){0,3})(\+(([0-9]+))|(-ga))|[1-9]((\.\d{1,3}){0,2})-((b\d{2,3})|(ga))|[1-9]u(\d{1,3})-((b\d{2,3})|(ga)) diff --git a/build.properties b/build.properties index 8f81df9aa20..427f0374fda 100644 --- a/build.properties +++ b/build.properties @@ -39,7 +39,7 @@ jfx.release.suffix=-ea # UPDATE THE FOLLOWING VALUES FOR A NEW RELEASE -jfx.release.major.version=19 +jfx.release.major.version=20 jfx.release.minor.version=0 jfx.release.security.version=0 jfx.release.patch.version=0 @@ -56,8 +56,8 @@ jfx.release.patch.version=0 javadoc.bottom=Report a bug or suggest an enhancement
Copyright © 2008, 2022, Oracle and/or its affiliates. All rights reserved.
-javadoc.title=JavaFX 19 -javadoc.header=JavaFX 19 +javadoc.title=JavaFX 20 +javadoc.header=JavaFX 20 ############################################################################## # diff --git a/modules/javafx.base/src/test/java/test/com/sun/javafx/runtime/VersionInfoTest.java b/modules/javafx.base/src/test/java/test/com/sun/javafx/runtime/VersionInfoTest.java index ec4eb5138e0..c61625a87cc 100644 --- a/modules/javafx.base/src/test/java/test/com/sun/javafx/runtime/VersionInfoTest.java +++ b/modules/javafx.base/src/test/java/test/com/sun/javafx/runtime/VersionInfoTest.java @@ -89,7 +89,7 @@ public void testMajorVersion() { String version = VersionInfo.getVersion(); // Need to update major version number when we develop the next // major release. - assertTrue(version.startsWith("19")); + assertTrue(version.startsWith("20")); String runtimeVersion = VersionInfo.getRuntimeVersion(); assertTrue(runtimeVersion.startsWith(version)); } From 62b66aff13bdca4c43bbfc1de5030576890dade1 Mon Sep 17 00:00:00 2001 From: Andy Goryachev Date: Fri, 15 Jul 2022 15:02:51 +0000 Subject: [PATCH 02/16] 8289611: MouseLocationOnScreenTest sometimes fails on Mac M1 Reviewed-by: kcr --- .../test/robot/javafx/scene/MouseLocationOnScreenTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/system/src/test/java/test/robot/javafx/scene/MouseLocationOnScreenTest.java b/tests/system/src/test/java/test/robot/javafx/scene/MouseLocationOnScreenTest.java index d4d5aaf7e2e..22134d0a810 100644 --- a/tests/system/src/test/java/test/robot/javafx/scene/MouseLocationOnScreenTest.java +++ b/tests/system/src/test/java/test/robot/javafx/scene/MouseLocationOnScreenTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -73,7 +73,8 @@ public static void initFX() { public void testMouseLocation() throws Exception { Screen screen = Screen.getPrimary(); - Rectangle2D bounds = screen.getBounds(); + // using visual bounds prevents hitting the camera notch area on newer Macs + Rectangle2D bounds = screen.getVisualBounds(); int x1 = (int) bounds.getMinX(); int x2 = (int) (x1 + bounds.getWidth() - 1); int y1 = (int) bounds.getMinY(); From 13a55c954ddeb6cb6b687ed077419abbd35c337c Mon Sep 17 00:00:00 2001 From: Andy Goryachev Date: Tue, 19 Jul 2022 15:27:14 +0000 Subject: [PATCH 03/16] 8289394: Fix warnings: Unlikely argument type Reviewed-by: nlisker, kcr --- .../jfx3dviewer/TimelineController.java | 4 ++-- .../binding/BidirectionalBindingTest.java | 3 ++- .../collections/ObservableSubListTest.java | 4 +++- .../com/sun/glass/ui/monocle/GetEvent.java | 4 ++-- .../javafx/css/Node_cssStyleMap_Test.java | 22 +++++++------------ .../scene/layout/BackgroundFillTest.java | 3 ++- .../scene/layout/BackgroundImageTest.java | 3 ++- .../scene/layout/BackgroundPositionTest.java | 3 ++- .../scene/layout/BackgroundSizeTest.java | 3 ++- .../javafx/scene/layout/BackgroundTest.java | 3 ++- .../scene/layout/BorderStrokeStyleTest.java | 3 ++- .../test/javafx/scene/layout/BorderTest.java | 3 ++- .../javafx/scene/layout/BorderWidthsTest.java | 3 ++- .../scene/paint/LinearGradientTest.java | 3 ++- .../scene/paint/RadialGradientTest.java | 3 ++- 15 files changed, 37 insertions(+), 30 deletions(-) diff --git a/apps/samples/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/TimelineController.java b/apps/samples/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/TimelineController.java index f7212531b81..c56caf327e8 100644 --- a/apps/samples/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/TimelineController.java +++ b/apps/samples/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/TimelineController.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. + * Copyright (c) 2010, 2022, Oracle and/or its affiliates. * All rights reserved. Use is subject to license terms. * * This file is available and licensed under the following license: @@ -76,7 +76,7 @@ public class TimelineController { endBtn.setDisable(false); loopBtn.setDisable(false); playBtn.setSelected(t.getCurrentRate() != 0); - loopBtn.setSelected(t.getCycleDuration().equals(Timeline.INDEFINITE)); + loopBtn.setSelected(t.getCycleCount() == Timeline.INDEFINITE); t.currentRateProperty().addListener(rateListener); } old = t; diff --git a/modules/javafx.base/src/test/java/test/com/sun/javafx/binding/BidirectionalBindingTest.java b/modules/javafx.base/src/test/java/test/com/sun/javafx/binding/BidirectionalBindingTest.java index a1ead8a1b26..e9c01780331 100644 --- a/modules/javafx.base/src/test/java/test/com/sun/javafx/binding/BidirectionalBindingTest.java +++ b/modules/javafx.base/src/test/java/test/com/sun/javafx/binding/BidirectionalBindingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -208,6 +208,7 @@ public void testHashCode() { assertEquals(hc1, hc2); } + @SuppressWarnings("unlikely-arg-type") @Test public void testEquals() { final BidirectionalBinding golden = BidirectionalBinding.bind(op1, op2); diff --git a/modules/javafx.base/src/test/java/test/javafx/collections/ObservableSubListTest.java b/modules/javafx.base/src/test/java/test/javafx/collections/ObservableSubListTest.java index 8fecb55e3ff..1558c61783a 100644 --- a/modules/javafx.base/src/test/java/test/javafx/collections/ObservableSubListTest.java +++ b/modules/javafx.base/src/test/java/test/javafx/collections/ObservableSubListTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -133,6 +133,7 @@ public void testClear() { mlo.check1AddRemove(list, Arrays.asList("b", "c", "d", "e"), 1, 1); } + @SuppressWarnings("unlikely-arg-type") @Test public void testContains() { assertTrue(sublist.contains("c")); @@ -154,6 +155,7 @@ public void testContainsNull() { assertTrue(sublist.contains(null)); } + @SuppressWarnings("unlikely-arg-type") @Test public void testEqualsOnAnotherType() { assertFalse(sublist.equals(Integer.valueOf(7))); diff --git a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/GetEvent.java b/modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/GetEvent.java index 85f83ee13f6..368344fe1e8 100644 --- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/GetEvent.java +++ b/modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/GetEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -101,7 +101,7 @@ class GetEvent { } devices.add(sysPath); } else if (action.equals("remove")) { - devices.remove(devPath); + devices.remove(sysPath); } } catch (IOException | RuntimeException e) { e.printStackTrace(); diff --git a/modules/javafx.graphics/src/test/java/test/javafx/css/Node_cssStyleMap_Test.java b/modules/javafx.graphics/src/test/java/test/javafx/css/Node_cssStyleMap_Test.java index 9a57a6b558f..b6694c299a1 100644 --- a/modules/javafx.graphics/src/test/java/test/javafx/css/Node_cssStyleMap_Test.java +++ b/modules/javafx.graphics/src/test/java/test/javafx/css/Node_cssStyleMap_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -73,9 +73,15 @@ public Node_cssStyleMap_Test() { boolean disabled = false; + /** + * @param property - must be a StyleableProperty + * @param map + * @param decls + */ private void checkFoundStyle(Property property, Map, List