On Tue, 22 Nov 2022 22:30:16 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> I agree. The problem is that we will not be able to enable the warning in >> IDE, or it has to be @suppressed. >> >> So the choice is either fix the code and enable warning, or keep the code as >> is and disable the warning. > > 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`). ------------- PR: https://git.openjdk.org/jfx/pull/960