<Swing Dev> [jdk17] RFR: 8269269: [macos11] SystemIconTest fails with ClassCastException

Alexander Zuev kizune at openjdk.java.net
Wed Jun 30 18:37:02 UTC 2021


On Wed, 30 Jun 2021 04:45:45 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> Even now, on Windows it is necessary to check is the returned object ImageIcon or not.

Yes but since API states that returned type is an Icon it should be done anyways - because we might wrap up Icon in ImageIcon locally but we can't force any 3rd party Java implementation to do the same so there will be requirement to check the returned type - unless we change the API to always return ImageIcon or MultiResolutionImageIcon or something even more complicated.

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

PR: https://git.openjdk.java.net/jdk17/pull/178


More information about the swing-dev mailing list