RFR: 8274835: Remove unnecessary castings in java.base

Tagir Valeev amaembo at gmail.com
Thu Oct 7 03:29:58 UTC 2021


On Thu, Oct 7, 2021 at 12:15 AM Joe Darcy <darcy at openjdk.java.net> wrote:

> Curious. The JDK build is done with javac -Xlint:cast warning enabled (JDK-8032734) which is intended to catch issues like this. Perhaps IntelliJ is using a different (or sharper) analysis.

Yes, our analysis is written independently of Javac (mostly by Anna
Kozlova) and we had a long history of false-positives/false-negatives
in this inspection, so it was tuned many times. It's not nearly
simple. For now, it's turned on for the whole IntelliJ IDEA Ultimate
repository (a warning causes the CI build to fail). I've found only
five explicit suppressions in our codebase. Not sure if all of them
are still necessary.

>
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/5454


More information about the security-dev mailing list