On 02.02.16 15:25, Alexandr Scherbatiy wrote:
     The provided example  should work with the check: "(icon instanceof
Icon)" in the same way as with the check "(icon != null && (icon
instanceof Icon))" because the used icon is not null and it implements
Icon interface, should not it?

Note that "icon instanceof Icon" in "(icon != null && (icon instanceof Icon))" is unnecessary because icon is Icon already. Only null check is necessary.

--
Best regards, Sergey.

Reply via email to