RFR: 8272756: Remove unnecessary explicit initialization of volatile variables in java.desktop [v3]

Alexey Ivanov aivanov at openjdk.java.net
Fri Oct 8 19:23:13 UTC 2021


On Fri, 8 Oct 2021 19:15:39 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> As far as I can see, it was. [Line 64](https://github.com/stsypanov/jdk/blob/d13ca9004b8e45f7df57c849271f3cfda5c43ec9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFIFD.java#L64):
>> 
>>             essentialTags = Set.of(
>> 
>> 
>> And it shows as such in [the diff of the commit](https://github.com/openjdk/jdk/commit/ccbce107f299c3b1c444e819c1fda7ae3c4866b5#diff-054fa06ac6a28817c38d879245a8490f22789d7c93d51b723c08616e154746c9).
>
> That was the usage of the local var, the current thread was about the local var itself, it is still there.

Good catch!
I missed that the local variable is still there and now it's unused, so an IDE should issue a warning about it.

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

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



More information about the client-libs-dev mailing list