<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi there,<div><br></div><div>Some of you may have noticed that I've been raising seemingly random JIRAs related to incorrect code.</div><div><br></div><div>During regular project work I use FindBugs quite a bit, especially when I'm dropped into a job with an existing code base.</div><div><br></div><div>One of the ways of using FindBugs is by setting it up in Maven and getting it to run reports for you. I gather that this is what you guys have attempted in the past. The problem with this is that it generates reams of paper (so to speak), often containing more false positives than useful information.</div><div><br></div><div>As I'm an eclipse user, I've installed the FindBugs plugin. When you're working on a particular module it's pretty easy to run FindBugs across it and see what it has to say:</div><div><br></div><div><img id="27682642-e56e-445c-9153-c3aac6b2feef" height="270" width="541" apple-width="yes" apple-height="yes" src="cid:F50FCFF0-3F3C-4F10-BB36-1AC61302CCE8@resolvesw.com.au"></div><div><br></div><div>You can see that it's not exactly overwhelming and you can ignore the noise (there's a lot of it in some unit tests) and zero in on the suspect stuff quite easily. For example, there's many instances of NP_NULL_ON_SOME_PATH such as:</div><div><br></div><div><blockquote type="cite"><span style="font-family: Times; ">Possible null pointer dereference of AbstractOperationContext.activeStep in org.jboss.as.controller.AbstractOperationContext.addStep(OperationStepHandler, OperationContext$Stage, boolean)</span></blockquote><br></div><div>ie. a value is tested for null, but is dereferenced later anyway.</div><div><br></div><div>If you decide to try it, grab the version from <<a href="http://findbugs.sourceforge.net/downloads.html">http://findbugs.sourceforge.net/downloads.html</a>> because the version in the Eclipse Marketplace seems to be broken.</div><div><br></div><div>Cheers,</div><div><br></div><div>Steve Coy</div><div>(Hopefully the image makes it through the mailing list)</div><div><br></div><div><br></div></body></html>