HDFS-7606. Fix potential NPE in INodeFile.getBlocks(). Contributed by Byron Wong.
This commit is contained in:
parent
00a7ebab22
commit
a116e1fe9e
|
@ -487,6 +487,8 @@ Release 2.7.0 - UNRELEASED
|
|||
|
||||
HDFS-7644. minor typo in HttpFS doc (Charles Lamb via aw)
|
||||
|
||||
HDFS-7606. Fix potential NPE in INodeFile.getBlocks(). (Byron Wong via shv)
|
||||
|
||||
Release 2.6.1 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -432,7 +432,7 @@ public class INodeFile extends INodeWithAdditionalFields
|
|||
return snapshotBlocks;
|
||||
// Blocks are not in the current snapshot
|
||||
// Find next snapshot with blocks present or return current file blocks
|
||||
snapshotBlocks = getDiffs().findLaterSnapshotBlocks(diff.getSnapshotId());
|
||||
snapshotBlocks = getDiffs().findLaterSnapshotBlocks(snapshot);
|
||||
return (snapshotBlocks == null) ? getBlocks() : snapshotBlocks;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue