On Wed, 30 Jun 2021 04:22:37 GMT, Alexander Zuev <kiz...@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

Reply via email to