RFR: 8344060: Remove doPrivileged calls from shared implementation code in the java.desktop module : part 1 [v2]

Harshitha Onkar honkar at openjdk.org
Fri Nov 15 23:02:43 UTC 2024


On Fri, 15 Nov 2024 19:49:02 GMT, Phil Race <prr at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove Suppresswarning
>
> src/java.desktop/share/classes/sun/awt/image/ImageWatched.java line 138:
> 
>> 136:                 // My referent is null so we must prune in a second pass.
>> 137:                 ret = true;
>> 138:             } else if (update(myiw, img, info, x, y, w, h) == false) {
> 
> In other cases, I might not say this, but here enough has changed anyway that I will ..
> update() is now a one-line method, called from just this one place.
> I think you could delete it and directly call myiw.imageUpdate(img, info, x, y, w, h);

I agree, in-lining it as myiw.imageUpdate(img, info, x, y, w, h); is simpler.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22133#discussion_r1844627779


More information about the client-libs-dev mailing list