small fixes found by FindBugs

Yes, all the Java files are weirdly indented and manual adjustments need to be done for each change, which I got too lazy to do now.

Soon (as soon as the current open PRs get merged) I will do a reformatting of the whole code to the standard Java style, so that it will be easier to keep the indentation right.