[Visual Studio 2026 May 
Update](https://learn.microsoft.com/en-us/visualstudio/releases/2026/release-notes#may-update-1860)
 (see C++ > MSVC Build Tools 14.51 > Standard Library (STL) > Other notable 
changes) removed support for some old, deprecated and non-standard STL 
extensions, including `hash_map` and `hash_set`. Both of these were used in 
`GlassClipboard`'s Windows part. Because of this change, JavaFX does not build 
under Visual Studio 2026 18.6 and later.

This commit replaces deprecated `hash_map` and `hash_set` with STL-equvalent 
`unordered_map` and `unordered_set`. `GlassClipboard` also used (also 
deprecated) `hash_value` template function to calculate hashes for non-standard 
WinAPI object `_bstr_t` and `FORMATETC` (the latter was implicitly generated by 
the extension). Those were also replaced with STL-endorsed `std::hash` 
specializations. No other changes were necessary.

All tests on Windows 11 pass successfully after this change and manual testing 
showed no regressions.

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

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

Commit messages:
 - GlassClipboard: Replace hash_map and hash_set

Changes: https://git.openjdk.org/jfx/pull/2198/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2198&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8387337
  Stats: 31 lines in 1 file changed: 19 ins; 0 del; 12 mod
  Patch: https://git.openjdk.org/jfx/pull/2198.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2198/head:pull/2198

PR: https://git.openjdk.org/jfx/pull/2198

Reply via email to