RFR: 8358452: JNI exception pending in Java_sun_awt_screencast_ScreencastHelper_remoteDesktopKeyImpl of screencast_pipewire.c:1214 (ID: 51119) [v2]
Alexey Ivanov
aivanov at openjdk.org
Fri Jun 6 15:02:05 UTC 2025
On Wed, 4 Jun 2025 07:00:33 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> I don't think so. Let Java catch it.
>
> ok..but checkReturnValue in ScreenCastHelper.java doesnt handle the exception for RESULT_ERROR case so it will be left to application to handle and am not sure if they will expect this internal exception..
So, `AWT_UNLOCK()` clears the exception if it occurs during unlocking, and throws any pending exception if it occurred before entering `AWT_UNLOCK()`. Re-throwing `pendingException` creates a pending exception again…
Therefore, the code has to bail out with `RESULT_ERROR` and to let Java deal with that exception.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25605#discussion_r2132347158
More information about the client-libs-dev
mailing list