RFR: 8348106: Catch C++ exception in Java_sun_awt_windows_WTaskbarPeer_setOverlayIcon [v2]
Alexey Ivanov
aivanov at openjdk.org
Tue Feb 11 15:18:11 UTC 2025
On Mon, 10 Feb 2025 21:50:26 GMT, Rajat Mahajan <rmahajan at openjdk.org> wrote:
>> **Issue:**
>> The JNI method `Java_sun_awt_windows_WTaskbarPeer_setOverlayIcon `calls `CreateIconFromRaster `that can throw a C++ exception.
>>
>> The C++ exception must be caught and must not be allowed to escape the JNI method. The call to `CreateIconFromRaster `has to wrapped into a try-catch block.
>>
>> **Solution:**
>>
>> Added exception handling to make sure any exception from `CreateIconFromRaster `is handled properly.
>>
>> Testing done.
>
> Rajat Mahajan has updated the pull request incrementally with two additional commits since the last revision:
>
> - Update src/java.desktop/windows/native/libawt/windows/awt_Taskbar.cpp
>
> Co-authored-by: Alexey Ivanov <alexey.ivanov at oracle.com>
> - Update copyright year.
Changes requested by aivanov (Reviewer).
src/java.desktop/windows/native/libawt/windows/awt_Taskbar.cpp line 2:
> 1: /*
> 2: * Copyright (c) 2016, 2025 Oracle and/or its affiliates. All rights reserved.
Suggestion:
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
A comma after 2025 is required.
-------------
PR Review: https://git.openjdk.org/jdk/pull/23470#pullrequestreview-2609078478
PR Review Comment: https://git.openjdk.org/jdk/pull/23470#discussion_r1951043779
More information about the client-libs-dev
mailing list