I am using Inspection Gadgets and have stumbled on a case I just don't
My code is:
TreeContext treeContext = (TreeContext) helper.getParameter(treeId);
assert treeContext != null; // NULL means we drew a tree but the context was
Collection updates = treeContext.handleCommand(command, nodeId,
The code compiles.
I get a warning on treeContext.handleCommand(command, nodeId,
treeInstanceId) that says that it may produce a null pointer exception. The
method doesn't throw any exception.
Oddly, if I remove the assert or change it to == the warning goes away.
Please tell me what I am missing? I have never had that occur with this
inspection, but it seems that in this case the inspection is wrong.