HDFS-15298 Fix the findbugs warnings introduced in HDFS-15217 (#1979)

This commit is contained in:
Toshihiro Suzuki 2020-04-27 17:20:47 +09:00 committed by GitHub
parent f91e21ac10
commit 62c26b91fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -3210,6 +3210,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
logAuditEvent(false, operationName, src, dst, null);
throw e;
}
assert ret != null;
boolean success = ret.success;
if (success) {
getEditLog().logSync();
@ -3244,7 +3245,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
throw e;
}
getEditLog().logSync();
assert res != null;
BlocksMapUpdateInfo collectedBlocks = res.collectedBlocks;
if (!collectedBlocks.getToDeleteList().isEmpty()) {
removeBlocks(collectedBlocks);
@ -7441,6 +7442,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
throw ace;
}
getEditLog().logSync();
assert effectiveDirective != null;
effectiveDirectiveStr = effectiveDirective.toString();
logAuditEvent(true, operationName, effectiveDirectiveStr);
return effectiveDirective.getId();