pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Martini <sandro.mart...@gmail.com>
Subject Re: Little things (by FindBugs)
Date Wed, 02 Dec 2009 09:25:56 GMT
Ok, this morning all works ... commit done.


Now a look of these warnings:
TerraAlertSkin.java:144 Unchecked/unconfirmed cast from
org.apache.pivot.wtk.Window to org.apache.pivot.wtk.Alert
TerraPromptSkin.java:137 Unchecked/unconfirmed cast from
org.apache.pivot.wtk.Window to org.apache.pivot.wtk.Prompt
TerraMenuPopupSkin.java:202 Unchecked/unconfirmed cast from
org.apache.pivot.wtk.Window to org.apache.pivot.wtk.MenuPopup
TerraFileBrowserSheetSkin.java:292 Unchecked/unconfirmed cast from
org.apache.pivot.wtk.Sheet to org.apache.pivot.wtk.FileBrowserSheet

What do you think on a simple fix like:
        if (!(window instanceof Alert))
            throw new IllegalArgumentException();
or maybe
            throw new IllegalArgumentException("window must be an Alert");
and similar in other cases ...

What do you think ?


Byeeee

Mime
View raw message