Closed paulur closed 11 years ago
Thanks for raising. Definitely an bug to be fixed.
In the meantime, a functional (but nasty) workaround is to have this line of code run before your test executes, e.g. in the @Before
or @BeforeClass
of a JUnit test:
Class.forName("com.youdevise.fbplugins.tdd4fb.DetectorRunner$Singleton");
The reason is that FindBugs needs to set up static state to initialise a BugAccumulator (yuk). Prodding the classloader to initialise DetectorRunner$Singleton
will trigger the initialisation.
This will be fixed to just work in the next release.
Oh, and thank you very much for raising the issue. Much appreciated.
Hi @paulur
This should be fixed now. Are you able to test the fix with a recent build? (removing the hack first of course)
Hey Graham,
Thanks for the update! I am traveling this week, but will try to see whether I could find sometime for reinstall the package. In any case, I'll get back to you by this Friday.
Thanks!
Paul
Sent from my iPhone
On Jul 14, 2013, at 10:07 AM, Graham Allan notifications@github.com wrote:
Hi @paulur
This should be fixed now. Are you able to test the fix with a recent build? (removing the hack first of course)
— Reply to this email directly or view it on GitHub.
Tested. Works well. Thanks!
Paul
Sent from my iPhone
On Jul 15, 2013, at 10:13 PM, Paul paulur@gmail.com wrote:
Hey Graham,
Thanks for the update! I am traveling this week, but will try to see whether I could find sometime for reinstall the package. In any case, I'll get back to you by this Friday.
Thanks!
Paul
Sent from my iPhone
On Jul 14, 2013, at 10:07 AM, Graham Allan notifications@github.com wrote:
Hi @paulur
This should be fixed now. Are you able to test the fix with a recent build? (removing the hack first of course)
— Reply to this email directly or view it on GitHub.
Great. I will release a new version soon.
The Junit Code public class CipherVerifierTester { @Test public void raisesAnyBugAgainstClassWithLongName() throws Exception {
}
The Detector Code public class CipherVerifier implements Detector { BugReporter bugReporter; BugAccumulator bugAccumulator;
Method method; ClassContext classContext;
}
NullPointerException at the line of the detector code: this.bugAccumulator = new BugAccumulator(bugReporter);