As noted in JDK-8327170, we have many javac lint warnings, and since they aren't enabled by default, new warnings can easily creep in.
As such we want to start fixing and then enabling various lint warnings, either globally or on a per-module basis.
This initial bug will address the "removal" and "missing-explicit-ctor" warnings. We have a few "removal" warnings that will be fixed as part of this bug. We ccurrently have no "missing-explicit-ctor" warnings, so just need to enable that lint option by default.
To see the removal warnings:
$ gradle -PLINT=removal sdk
In javafx.base there are 2 warnings:
modules/javafx.base/src/main/java/javafx/util/converter/CurrencyStringConverter.java:97: warning: [removal] getNumberFormat() in NumberStringConverter has been deprecated and marked for removal
modules/javafx.base/src/main/java/javafx/util/converter/PercentageStringConverter.java:73: warning: [removal] getNumberFormat() in NumberStringConverter has been deprecated and marked for removal
In javafx.graphics there are 48 warnings in 5 files:
modules/javafx.graphics/src/main/java/com/sun/javafx/css/SelectorPartitioning.java
modules/javafx.graphics/src/main/java/javafx/css/CompoundSelector.java
modules/javafx.graphics/src/main/java/javafx/css/CssParser.java
modules/javafx.graphics/src/main/java/javafx/css/Match.java
modules/javafx.graphics/src/main/java/javafx/css/Selector.java
Each of the warnings is an access to one of the following two terminally deprecated classes:
warning: [removal] CompoundSelector in javafx.css has been deprecated and marked for removal
warning: [removal] SimpleSelector in javafx.css has been deprecated and marked for removal
See the attached log file for the complete list of removal warnings.
As such we want to start fixing and then enabling various lint warnings, either globally or on a per-module basis.
This initial bug will address the "removal" and "missing-explicit-ctor" warnings. We have a few "removal" warnings that will be fixed as part of this bug. We ccurrently have no "missing-explicit-ctor" warnings, so just need to enable that lint option by default.
To see the removal warnings:
$ gradle -PLINT=removal sdk
In javafx.base there are 2 warnings:
modules/javafx.base/src/main/java/javafx/util/converter/CurrencyStringConverter.java:97: warning: [removal] getNumberFormat() in NumberStringConverter has been deprecated and marked for removal
modules/javafx.base/src/main/java/javafx/util/converter/PercentageStringConverter.java:73: warning: [removal] getNumberFormat() in NumberStringConverter has been deprecated and marked for removal
In javafx.graphics there are 48 warnings in 5 files:
modules/javafx.graphics/src/main/java/com/sun/javafx/css/SelectorPartitioning.java
modules/javafx.graphics/src/main/java/javafx/css/CompoundSelector.java
modules/javafx.graphics/src/main/java/javafx/css/CssParser.java
modules/javafx.graphics/src/main/java/javafx/css/Match.java
modules/javafx.graphics/src/main/java/javafx/css/Selector.java
Each of the warnings is an access to one of the following two terminally deprecated classes:
warning: [removal] CompoundSelector in javafx.css has been deprecated and marked for removal
warning: [removal] SimpleSelector in javafx.css has been deprecated and marked for removal
See the attached log file for the complete list of removal warnings.
- blocks
-
JDK-8334161 Enable -Werror for javac tasks to fail on any warnings
- Resolved
-
JDK-8327170 ☂ Enable and fix javac lint warnings
- Open
- duplicates
-
JDK-8252782 Enable javac lint option: missing-explicit-ctor
- Closed
- relates to
-
JDK-8334143 Suppress remaining removal warnings for internal methods and classes
- Resolved
-
JDK-8334138 Suppress removal warnings for sun.misc.Unsafe memory access methods
- Resolved
(2 links to)