<Swing Dev> [jdk17] RFR: 8269269: [macos11] SystemIconTest fails with ClassCastException
Alexander Zuev
kizune at openjdk.java.net
Wed Jun 30 04:27:03 UTC 2021
On Wed, 30 Jun 2021 03:01:03 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> * but what happens if the file cannot be read? We will call the "sf = ShellFolder.getShellFolder" and then we call "sf.getIcon()" and it returns what? As far as I understand it always return MultiResolutionIconImage, no?
> *
No, the native code will fail to load the icon but since file does exist and we only return null for nonexistent file we will fall back to UIManager.getIcon which returns icon from the installed LAF resource bundle. This is correct behavior since otherwise we might end in file manager with file that has no icon at all. Right now that will be a single resolution icon for all the LAFs. Again, in the future that can be changed but right now it is a single resolution icon.
-------------
PR: https://git.openjdk.java.net/jdk17/pull/178
More information about the swing-dev
mailing list