jcr2vfs: fix few dozens of errors/warnings reported by FindBugs

(cherry picked from commit 94ace31bcf14a18848a0d01c2f1c9257aa167db9)