I can’t uncheck the “checking pattern” detector “UnreadFields” in the FindBugs project properties and then check it again, i.e. the bugs that where found in the first run (before I unchecked the pattern) will not be found again after checking it. If I restart Eclipse, they will however be found again.
How to repeat it:
1. Run FindBugs on the code attached. It will report a “Write to static field” on the assignment “theStatic = 17”
2. Uncheck the “UnreadFields” detector in the FindBugs project properties.
3. Run FindBugs. It will now not report the “Write to static field”, which is OK.
4. Now check the “UnreadFields” detector again.
5. Run FindBugs. It will still not report the “Write to static field”, even though it should.
I tried the same thing with the detector “FindReturnRef”, but that one does not have this problem (attached file contains such a bug also). But I have not tried it on any other detectors, so there may be others with the same problem.
I ran the FindBugs Eclipse plug-in version 1.2.1-rc2 on a windows XP pro SP2.
I have noticed this bug in some earlier version of FindBugs plug-in also.
Eclipse Version: 3.2.0 Build id: M20060629-1905
Log in to post a comment.