[OpenJDK 2D-Dev] RFR: 8231041: Spotbugs: Null check of value previously dereferenced in java.desktop

Sergey Bylokhov serb at openjdk.java.net
Tue Dec 22 23:00:55 UTC 2020


On Tue, 22 Dec 2020 20:17:59 GMT, Phil Race <prr at openjdk.org> wrote:

>> I checked JDK16 repository in SpotBugs 4.2.0
>> ![изображение](https://user-images.githubusercontent.com/741251/102926543-405c9000-44a6-11eb-9772-bf81a22ec78a.png)
>> I fixed only places in java.desktop module.
>> I didn't fixed places, where dereferencing is done inside method.
>
> Did it occur that maybe the previous de-reference without a null check is the real problem ?
> The proposed Raster change actually needs to be addressed as discussed inhttps://bugs.openjdk.java.net/browse/JDK-8255800 and so should not be part of this proposed change. DataBufferUShort may be the same.
> 
> But *all* of them need to be re-examined rather than just blindly updating them as some tool suggests.

I had a similar fix in past, but the problem here is that most of these exceptions are not specified, or specified differently than actually works. So I postponed the fix since the spec clarification is required. I suggest postponing this PR until then.

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

PR: https://git.openjdk.java.net/jdk/pull/1869


More information about the 2d-dev mailing list