JBIDE-16592: a few fixes suggested by Findbugs