Skip to content

Commit 1b41027

Browse files
committed
Fix cody style
1 parent 39e3938 commit 1b41027

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoContiguous.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,11 @@ boolean removeStorage(DatanodeStorageInfo storage) {
8484
@Override
8585
boolean isProvided() {
8686
int len = getCapacity();
87-
for(int idx = 0; idx < len; idx++) {
88-
DatanodeStorageInfo cur = getStorageInfo(idx);
89-
if(cur != null) {
90-
if (cur.getStorageType() == StorageType.PROVIDED) {
91-
return true;
92-
}
87+
for (int idx = 0; idx < len; idx++) {
88+
DatanodeStorageInfo storage = getStorageInfo(idx);
89+
if (storage != null
90+
&& storage.getStorageType().equals(StorageType.PROVIDED)) {
91+
return true;
9392
}
9493
}
9594
return false;

0 commit comments

Comments
 (0)