No bug search for classes inside of inner member classes
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
run findbugs on the followed class:
public class Test {
private void testNamedInnerClass() {
class B implements Runnable {
public void run() {
String s = null;
s.equals(new Object() {
void test(){
String s = null;
s.equals(new Object() {
});
}
});
}
}
}
private void testAnonymousClass() {
Thread t = new Thread(new Runnable (){
public void run() {
String s = null;
s.equals(new Object() {
void test(){
String s = null;
s.equals(new Object() {
});
}
});
}
});
}
}
AS IS:
NP bug ("Null pointer dereference") is reported only twice
TO BE:
there are 4 NP bugs.
The bugs inside of inner member classes (both named or anonymous) are not
reported at all. It looks like FindBugs either ignores these classes
during bug search or could not report bugs for.
Using latest FindBugs from SVN on Eclipse 3.2.2 with JDK 1.5
Original issue reported on code.google.com by andya...@nurfuerspam.de
on 30 Oct 2006 at 10:35
Google Code Exporter commented
at least a partial fix for 1.1.2-rc4. Finding Element types for anonymous inner
classes is a pain.
Please check
Original comment by bill.p...@gmail.com
on 16 Dec 2006 at 8:38
- Changed state: Fixed
Google Code Exporter commented
Using the same test case and 1.1.2-rc4 still exactly the same behavoir as
before (2
NP bugs reported instead of 4). Why this report is now marked as fixed?
Original comment by andya...@nurfuerspam.de
on 18 Dec 2006 at 8:15
Google Code Exporter commented
Because I made a stupid mistake in trying to also fold in a fix to another bug.
Should be fixed now.
Original comment by bill.p...@gmail.com
on 18 Dec 2006 at 10:45