HDFS-7143. Fix findbugs warnings in HDFS-6581 branch