RFR: JDK-8297413: Remove easy warnings in javafx.graphics [v4]

Kevin Rushforth kcr at openjdk.org
Tue Dec 6 12:50:28 UTC 2022


On Tue, 6 Dec 2022 08:54:26 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>> I don't see it as a useful warning. The code isn't necessarily better without, and can be less clear. I think this might argue for asking Eclipse users to disable this warning in the IDE.
>
> @kevinrushforth Is this okay as it is?  Even though the benefit of removing the cast here is minimal, removing it still seems better as it won't need to be suppressed later if we decide to enforce the rules as part of the build.  In this specific case, there was no obvious way to "break" the code (by losing precision) by changing something unrelated (like changing `ptSize` to `double` or `long`).

Yes, this is OK.

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

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


More information about the openjfx-dev mailing list