On Thu, 20 Mar 2025 22:19:47 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

>> src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c line 1104:
>> 
>>> 1102: Java_sun_awt_screencast_ScreencastHelper_closeSession(JNIEnv *env, 
>>> jclass cls) {
>>> 1103: }
>>> 1104: 
>> 
>> Suggestion:
>> 
>> 
>> 
>> This doesn't seem necessary since this method should only be called if 
>> `loadPipewire` returns true.
>
> To me it sounds like defensive programming to include an implementation of 
> all native methods, so the JVM will not crash if it mistakenly is called. Do 
> you see a problem with that?

I do not see a problem here, but in this case the 
`Java_sun_awt_screencast_ScreencastHelper_getRGBPixelsImpl` is missing, as the 
ScreencastHelper has 3 native methods.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24009#discussion_r2006546267

Reply via email to