From 4719ef187d904c2d40465ce8f5cf15faab775f4d Mon Sep 17 00:00:00 2001 From: bhaweshkc Date: Fri, 28 Aug 2020 20:03:22 +0530 Subject: [PATCH 1/2] 8252387: Deprecate for removal css Selector and ShapeConverter constructors --- .../javafx.graphics/src/main/java/javafx/css/Selector.java | 7 +++++++ .../src/main/java/javafx/css/converter/ShapeConverter.java | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/modules/javafx.graphics/src/main/java/javafx/css/Selector.java b/modules/javafx.graphics/src/main/java/javafx/css/Selector.java index b9e01259366..be450f53861 100644 --- a/modules/javafx.graphics/src/main/java/javafx/css/Selector.java +++ b/modules/javafx.graphics/src/main/java/javafx/css/Selector.java @@ -42,6 +42,13 @@ */ abstract public class Selector { + /** + * @deprecated This constructor was exposed erroneously and will be removed in the next version. + */ + @Deprecated(since="16", forRemoval=true) + public Selector() { + } + private static class UniversalSelector { private static final Selector INSTANCE = new SimpleSelector("*", null, null, null); diff --git a/modules/javafx.graphics/src/main/java/javafx/css/converter/ShapeConverter.java b/modules/javafx.graphics/src/main/java/javafx/css/converter/ShapeConverter.java index fce0e5db7fe..36da3ad868d 100644 --- a/modules/javafx.graphics/src/main/java/javafx/css/converter/ShapeConverter.java +++ b/modules/javafx.graphics/src/main/java/javafx/css/converter/ShapeConverter.java @@ -43,6 +43,13 @@ public class ShapeConverter extends StyleConverter { public static StyleConverter getInstance() { return INSTANCE; } + /** + * @deprecated This constructor was exposed erroneously and will be removed in the next version. Use {@link #getInstance()} instead. + */ + @Deprecated(since="16", forRemoval=true) + public ShapeConverter() { + } + @Override public Shape convert(ParsedValue value, Font font) { Shape shape = super.getCachedValue(value); From eb2f71b89500520009bf2bf43c481e7e67bfb6c2 Mon Sep 17 00:00:00 2001 From: bhaweshkc Date: Fri, 28 Aug 2020 22:47:54 +0530 Subject: [PATCH 2/2] Updated Selector class comments as per review --- modules/javafx.graphics/src/main/java/javafx/css/Selector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/javafx.graphics/src/main/java/javafx/css/Selector.java b/modules/javafx.graphics/src/main/java/javafx/css/Selector.java index be450f53861..376fb881ab2 100644 --- a/modules/javafx.graphics/src/main/java/javafx/css/Selector.java +++ b/modules/javafx.graphics/src/main/java/javafx/css/Selector.java @@ -43,7 +43,7 @@ abstract public class Selector { /** - * @deprecated This constructor was exposed erroneously and will be removed in the next version. + * @deprecated This constructor was exposed erroneously and will be removed in the next version. Use {@link #createSelector(String)} instead. */ @Deprecated(since="16", forRemoval=true) public Selector() {