Sorry for the late reply,
I expected an email if there would occur any changes to this thread and since I got none I just saw your reply this morning.
For our findbugs-run we are using a locally installed version of findbugs with our added rules.
The resulting findbugs.xml contains the following BugInstance and BugPattern:
<BugInstance type="TS_JAVA_UTIL_DATE_CTOR" priority="1" abbrev="TS" category="CORRECTNESS" instanceHash="d3576a048cadb3be35d6c865f2150532" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
<BugPattern type="TS_JAVA_UTIL_DATE_CTOR" abbrev="TS" category="CORRECTNESS">
When using the plugin we thought that you would only parse the xml-file without the need of findbugs itself but that's obviously wrong.
Reading about the "BugRank"-Concept introduced in Release 4.13 we tried just adding our entry to the bugrank.txt but that wasn't helping either.
To make it easier for you to get at our problem I've performed a series of tests.
The 4 relevant files are:
- bugrank.txt
- findbugs.xml
- messages.xml
- our jar
During my tests I've added the files one by one to the library-2.0.0-hudson3a.jar found in the lib-folder of the plugin respectively our jar directly to that folder.
As long as the findbugs.xml is missing the System considers the above BugInstance as "Low Priority" within the "Experimental"-Category.
When inserting our bug-descriptions into the findbugs.xml the PluginLoader tries to instantiate the class resulting in:
> Caused by: edu.umd.cs.findbugs.PluginException: Could not instantiate detector class: java.lang.ClassNotFoundException: de.findbugs.detector.TimeServiceDetector
> at edu.umd.cs.findbugs.PluginLoader.init(PluginLoader.java:638)
> at edu.umd.cs.findbugs.PluginLoader.loadPlugin(PluginLoader.java:254)
> at edu.umd.cs.findbugs.PluginLoader.loadInitialPlugins(PluginLoader.java:1053)
> ... 23 more
> Caused by: java.lang.ClassNotFoundException: de.findbugs.detector.TimeServiceDetector
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
Adding our jar to the libs-folder of the plugin it is missing the detector description:
> Caused by: edu.umd.cs.findbugs.PluginException: Missing Detector description for detector de.findbugs.detector.TimeServiceDetector
> at edu.umd.cs.findbugs.PluginLoader.findMessageNode(PluginLoader.java:907)
> at edu.umd.cs.findbugs.PluginLoader.init(PluginLoader.java:625)
> at edu.umd.cs.findbugs.PluginLoader.loadPlugin(PluginLoader.java:254)
> at edu.umd.cs.findbugs.PluginLoader.loadInitialPlugins(PluginLoader.java:1053)
Adding the messages.xml the System suddenly considers the BugInstance as "Normal Priority" whithin the choosen "Correctness"-Category.
So we are nearly there, the only thing not working out is the priority. Adding the our information to the bugrank.txt resolves the last issue.
The StackTraces are way longer if you need more of it feel free to ask.
One minor issue remains. The BugPattern in the findbugs.xml lists as follows:
<BugPattern type="TS_JAVA_UTIL_DATE_CTOR" abbrev="TS" category="CORRECTNESS">
<ShortDescription>Direkter Zugriff auf new java.util.Date()</ShortDescription>
<Details><![CDATA[
<p>Long German Text</p>
<p>LGT Part 2</p>
]]></Details>
</BugPattern>
The Results Page is missing the Details:
> Zugriff auf new java.util.Date() ohne den TimeService gefunden in de.psi.passage3.kernel.test.gui.filter.AbstractTestFilterPanelVC$1.run().0 comments
>
> Keine Beschreibung vorhanden.
I hope this helps you with our problem if I'm missing a majof point of plugin-installation, classpath etc. just tell me.
BTW: Thanks a lot for your great plugins!
Findbugs 2.4 includes the fbcontrib package. Did you try that version?
Do you need other (or own) plugins to be integrated with the plugin?