Motivation for the 'Findbugs™ Warnings By Example' Series

Unfortunately, some parts of the descriptions are not easy to understand (even for experienced Java developers). It can be difficult to understand the exact root cause for a warning and/or to find the correct way of fixing.

To be honest - at least I had problems with some warnings in the last years. Quite often, I found no helping sample code in the web. The main weakness of the bug descriptions is, that it uses seldom sample code to demonstrate the wrong and correct situation.

Example Code

The following code has been compiled with JDK 1.6.0_24 and Findbugs™ (Version 2.0.1-rc2) will show all warnings with the default settings of the Findbugs™ Eclipse Plugin (Version 2.0.1.20120511).