Tag: FindBugs
-
FindBug: Solving DM_DEFAULT_ENCODING Warning When Using FileWriter
PROBLEM Let’s assume we have the following code to write some data into a file:- When running this code against a static code analysis tool, such as Findbugs, we get this high priority warning:- The Javadoc for FileWriter says:- Obviously, this class is too convenient and FindBugs is not happy about it. Further, there is… Read More…
-
Suppressing FindBugs Warnings
PROBLEM FindBugs is one of the many great static code analysis tools that I use everyday. However, the generated report may usually contain a few false positives that forces me to weave through them whenever I rerun my build on Jenkins. For example, I’m using Google Guava to construct my equals(…) and hashCode():- FindBugs will… Read More…