<Swing Dev> [jdk17] RFR: 8269269: [macos11] SystemIconTest fails with ClassCastException
Sergey Bylokhov
serb at openjdk.java.net
Wed Jun 30 04:54:06 UTC 2021
On Wed, 30 Jun 2021 04:22:37 GMT, Alexander Zuev <kizune at openjdk.org> wrote:
> No, the native code will fail to load the icon
So what call will fail? Is the "sf.getIcon()" return null? in what line of code?
>> But you cannot change the return type later, so all these instanceof+casts will be there forever.
>
>> But you cannot change the return type later, so all these instanceof+casts will be there forever.
>
> Well, if there is a reason the API can be amended in the future version of Java. It is not cast in stone. Yes, it will require some justification, but if justification is provided then API can be changed.
Not in this case, you cannot change the public signature.
-------------
PR: https://git.openjdk.java.net/jdk17/pull/178
More information about the swing-dev
mailing list