Skip to content

Commit 7bfebda

Browse files
committed
HDFS-15160. amend to fix javac error supressing unchecked warning
1 parent 0c20e27 commit 7bfebda

File tree

1 file changed

+2
-2
lines changed
  • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl

1 file changed

+2
-2
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,16 @@ public Block getStoredBlock(String bpid, long blkid)
201201
* The deepCopyReplica call doesn't use the datasetock since it will lead the
202202
* potential deadlock with the {@link FsVolumeList#addBlockPool} call.
203203
*/
204+
@SuppressWarnings("unchecked")
204205
@Override
205206
public Set<? extends Replica> deepCopyReplica(String bpid)
206207
throws IOException {
207-
Set<? extends Replica> replicas = null;
208+
Set<? extends Replica> replicas;
208209
try (AutoCloseableLock lock = datasetReadLock.acquire()) {
209210
replicas =
210211
new HashSet<>(volumeMap.replicas(bpid) == null ? Collections.EMPTY_SET
211212
: volumeMap.replicas(bpid));
212213
}
213-
214214
return Collections.unmodifiableSet(replicas);
215215
}
216216

0 commit comments

Comments
 (0)