RFR: JDK-8297414: Remove easy warnings in javafx.controls [v8]

Kevin Rushforth kcr at openjdk.org
Tue Nov 29 18:27:36 UTC 2022


On Tue, 29 Nov 2022 16:55:34 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>> Note: I ran into a `javac` compiler bug while replacing types with diamond operators (ecj has no issues).  I had two options, add a `SuppressWarnings("unused")` or to use a lambda instead of a method reference to make `javac` happy.  I choose the later and added a comment so it can be fixed once the bug is fixed.  I've reported the issue here: https://bugs.openjdk.org/browse/JDK-8297428
>> 
>> - Remove unsupported/unnecessary SuppressWarning annotations
>> - Remove reduntant type specifications (use diamond operator)
>> - Remove unused or duplicate imports
>> - Remove unnecessary casts (type is already correct type or can be autoboxed)
>> - Remove unnecessary semi-colons (at end of class definitions, or just repeated ones)
>> - Remove redundant super interfaces (interface that is already inherited)
>> - Remove unused type parameters
>> - Remove declared checked exceptions that are never thrown
>> - Add missing `@Override` annotations
>
> John Hendrikx has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 23 commits:
> 
>  - Merge branch 'master' of https://git.openjdk.org/jfx into feature/fix-easy-warnings-in-controls
>  - Fix some indents and put declarations on one line where possible
>  - Replace StubToolkit casts with asserts (2)
>  - Revert read only property instanceof checks
>    
>    Added SuppressWarnings("cast") as these checks should be retained
>  - Replace StubToolkit casts with asserts
>  - Revert instanceof changes and replace with null checks
>  - Revert "Fix warnings in fxml"
>    
>    This reverts commit b148aa3cc8a4676167a9eb8a023cddce3de116e7.
>  - Fix warnings in fxml
>  - Add workaround for JDK-8297428 (javac compiler type inference bug)
>  - Remove unused imports
>  - ... and 13 more: https://git.openjdk.org/jfx/compare/fbad15d1...1697bd1d

There are two changes to public class declarations that must be reverted. I spot checked the rest and didn't see any problems.

modules/javafx.controls/src/main/java/javafx/scene/control/TableColumn.java line 134:

> 132:  * @since JavaFX 2.0
> 133:  */
> 134: public class TableColumn<S,T> extends TableColumnBase<S,T> {

This class is part of the public API, so this change must be reverted. The list of implemented classes shows up in the class file and in the javadoc. I suspect that this might be a compatible change, but would need to double-check to be certain. In any case, I don't want this change made.

modules/javafx.controls/src/main/java/javafx/scene/control/TreeTableColumn.java line 127:

> 125:  * @since JavaFX 8.0
> 126:  */
> 127: public class TreeTableColumn<S,T> extends TableColumnBase<TreeItem<S>,T> {

Revert this.

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

Changes requested by kcr (Lead).

PR: https://git.openjdk.org/jfx/pull/959


More information about the openjfx-dev mailing list