RFR: 8320692: Null icon returned for .exe without custom icon [v2]

Alexey Ivanov aivanov at openjdk.org
Fri Jan 19 17:46:29 UTC 2024


On Thu, 18 Jan 2024 19:40:40 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> Replaced asserts with NullPointerException calls because outside of testing that would be more informative - i do not think many people running their applications with assertions in system libraries enabled;
>> Added a code that will analyze the result of the getIcon and will fall back to the default icon for the file type retrieved from the ShellFolder;
>> Added a test case made by Aleksei Ivanov.
>
> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Revert NPE to asserts
>   Move null check inside the loop so we do not retrieve extra
>   icons if we encounter a null one

Marked as reviewed by aivanov (Reviewer).

src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java line 1421:

> 1419:         public MultiResolutionIconImage(int baseSize, Map<Integer, Image> resolutionVariants) {
> 1420:             assert !resolutionVariants.containsValue(null)
> 1421:                     : "There are null icons in the MRI variants map";

Here's an extra space. The colon aligned with `!` which starts the condition.

Could you please revert it too?

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

PR Review: https://git.openjdk.org/jdk/pull/17475#pullrequestreview-1833346740
PR Review Comment: https://git.openjdk.org/jdk/pull/17475#discussion_r1459428926


More information about the client-libs-dev mailing list