HDFS-7516. Fix findbugs warnings in hdfs-nfs project. Contributed by Brandon Li

(cherry picked from commit 42d8858c5d237c4d9ab439c570a17b7fcaf781c2)