2 comments

The problem is that method calls my have side-effects, to say nothing of
multi-threaded effects, so Idea is very conservative (too conservative
in my book) and decides that the method you have called might reset the
field to null.

You can work around it by introducing a local variable, e.g.
ContractNodes n = this.contractNodes;
if (n != null)
{
n.getInputContractNode().deleteObservers();
n.getOutputContractNode().deleteObservers();
}

and so on.

HTH,
R

0

Great, thanks! That's certainly conservative, but I guess it has to be.

Cheers,
Colin

0

Please sign in to leave a comment.