RFR: 8348106: Catch C++ exception in Java_sun_awt_windows_WTaskbarPeer_setOverlayIcon [v2]

Rajat Mahajan rmahajan at openjdk.org
Mon Feb 10 21:50:26 UTC 2025


> **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:
  - all: https://git.openjdk.org/jdk/pull/23470/files
  - new: https://git.openjdk.org/jdk/pull/23470/files/554aaa70..66f0a452

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23470&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23470&range=00-01

  Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/23470.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23470/head:pull/23470

PR: https://git.openjdk.org/jdk/pull/23470


More information about the client-libs-dev mailing list