After reflecting on the messages shown by the Inspector, I reviewed my
(mis)understanding of what it does.
> > JComponent component = getComponent();
> > final String componentName = component.getName();
> > if (component == null || !"xxx".equals(componentName)) {
> > return;
> > }
As I know that getComponent() can return null, saying component == null
is always false made me expect that there should be a warning that the
previous line could throw a NPE.
I'm so used to Idea being that smart that obviously it should know when
methods can return null :)
Now that I'm used to what Inspector really does, the message "x == null
is always false" makes sense: a NPE can happen somewhere in the code
before the statement.
Carlos
--
Carlos Costa e Silva <[EMAIL PROTECTED]>
_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list