On Tue, 19 Nov 2024 21:45:31 GMT, Alexander Zuev <[email protected]> wrote:
>> Phil Race has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> 8344064
>
> src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java
> line 2042:
>
>> 2040: private static boolean isLinkedProfileAllowed() {
>> 2041: if (isLinkedProfileAllowed == null) {
>> 2042: isLinkedProfileAllowed =
>> Boolean.getBoolean("sun.imageio.bmp.enableLinkedProfiles");
>
> Do we even need that static variable? Why not just
> `return Boolean.getBoolean("sun.imageio.bmp.enableLinkedProfiles");`
> Performance? Does it deserve an internal caching? Just curious.
Fairly standard practice to cache the results of such calls.
Changing it in this PR would have to be for a very good reason.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22186#discussion_r1850812563