[infinispan-dev] FindBugs on infinispan

Jakub Markos jmarkos at redhat.com
Thu Mar 19 12:16:12 EDT 2015


Hi,

out of curiosity, I ran FindBugs [1] (java static analysis tool) on infinispan. Attached are 2 output files (compressed, because the mailing list accepts only <0.5MB attachments):
1. for the release-jars-analysis.html, only the 3 main jars from 7.2.0.Alpha1 were analyzed
2. for the project-jars-analysis.html, I took all jars that were present in the infinispan project directory after a build (except the test jars) - this one has therefore more findings

In both cases, FindBugs complained that it couldn't find some imported classes, so the analysis may not be 100% complete.

I didn't look through the actual results much, but for example it detected an infinite loop at [2], or a self-assignment at [3].

If you want to run it yourself, you can use [4]. There is also a GUI, but I wasn't able to save the results into a html, and a maven
plugin [5], but it only creates the results in an xml format for each module separately, so it's not very useful.

Jakub

[1] http://findbugs.sourceforge.net/
[2] https://github.com/infinispan/infinispan/blob/841c789a866745b8d48475f98acd51fa74b16f13/core/src/main/java/org/infinispan/context/impl/ImmutableContext.java#L95
[3] https://github.com/infinispan/infinispan/blob/841c789a866745b8d48475f98acd51fa74b16f13/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/transport/tcp/TcpTransportFactory.java#L90
[4] bin/findbugs -maxHeap 4000 -effort:max -textui -progress -release infinispan -html -output infinispan-findbugs-analysis -onlyAnalyze org.infinispan.- infinispan-7.2.0.Alpha1-all/infinispan-embedded-7.2.0.Alpha1.jar infinispan-7.2.0.Alpha1-all/infinispan-embedded-query-7.2.0.Alpha1.jar infinispan-7.2.0.Alpha1-all/infinispan-remote-7.2.0.Alpha1.jar
[5] http://mojo.codehaus.org/findbugs-maven-plugin/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: analysis.zip
Type: application/zip
Size: 126933 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/infinispan-dev/attachments/20150319/7993f254/attachment-0001.zip 


More information about the infinispan-dev mailing list