On Mon, 28 Nov 2022 17:04:17 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:

>> - 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 incrementally with one additional 
> commit since the last revision:
> 
>   Revert change of private class to abstract in FXMLLoader
>   
>   Exception is now documented instead

An abstract comment about the "warning removals" PRs.

As I go over the code in various places to look at suspicious changes, I find 
some rather peculiar pieces of code. In this PR it was the non-abstract empty 
implementations, in the other PRs it's various other things. While I don't 
suggest to start rewriting code that has been working for years, I find it 
interesting to see how paradigms have changed since 2014 or before and how 
there are more expressive ways to write the same code today.

I toyed a bit with some code segments and rewrote them locally just to see what 
it would look like, and I was happy with the results (didn't save any of the 
changes since I don't plan to commit them). Just food for thought about how 
dealing with these warnings can reveal not only immediate bugs, but also 
sketchy code that makes you raise an eyebrow.

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

Marked as reviewed by nlisker (Reviewer).

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

Reply via email to