Another round of findbug and checkstyle fixes.

Every time I pick up changes from upstream I seem to spend 20 minutes
fixing things that can be easily caught by static code analysis.
Merge pull request #222 from hgschmie/findbugs-3

Another round of findbug and checkstyle fixes.