Skip to content

Commit 7b6219a

Browse files
vivekratnavelelek
authored andcommitted
HDDS-2182. Fix checkstyle violations introduced by HDDS-1738
Closes #1529
1 parent 587a8ee commit 7b6219a

File tree

6 files changed

+15
-9
lines changed

6 files changed

+15
-9
lines changed

hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/bucket/OMBucketDeleteResponse.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos;
2626
import org.apache.hadoop.hdds.utils.db.BatchOperation;
2727

28-
import javax.annotation.Nullable;
2928
import javax.annotation.Nonnull;
3029

3130
/**

hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/key/OMKeyCommitResponse.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public class OMKeyCommitResponse extends OMClientResponse {
3636
private OmKeyInfo omKeyInfo;
3737
private long openKeySessionID;
3838

39-
public OMKeyCommitResponse(@Nullable OmKeyInfo omKeyInfo, long openKeySessionID,
39+
public OMKeyCommitResponse(@Nullable OmKeyInfo omKeyInfo,
40+
long openKeySessionID,
4041
@Nonnull OzoneManagerProtocolProtos.OMResponse omResponse) {
4142
super(omResponse);
4243
this.omKeyInfo = omKeyInfo;

hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/key/OMKeyDeleteResponse.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
public class OMKeyDeleteResponse extends OMClientResponse {
3939
private OmKeyInfo omKeyInfo;
4040

41-
42-
public OMKeyDeleteResponse(@Nullable OmKeyInfo omKeyInfo, @Nonnull OMResponse omResponse) {
41+
public OMKeyDeleteResponse(@Nullable OmKeyInfo omKeyInfo,
42+
@Nonnull OMResponse omResponse) {
4343
super(omResponse);
4444
this.omKeyInfo = omKeyInfo;
4545
}
@@ -69,7 +69,7 @@ public void addToDBBatch(OMMetadataManager omMetadataManager,
6969
// instance in deletedTable.
7070
RepeatedOmKeyInfo repeatedOmKeyInfo =
7171
omMetadataManager.getDeletedTable().get(ozoneKey);
72-
if(repeatedOmKeyInfo == null) {
72+
if (repeatedOmKeyInfo == null) {
7373
repeatedOmKeyInfo = new RepeatedOmKeyInfo(omKeyInfo);
7474
} else {
7575
repeatedOmKeyInfo.addOmKeyInfo(omKeyInfo);
@@ -83,10 +83,14 @@ public void addToDBBatch(OMMetadataManager omMetadataManager,
8383
/**
8484
* Check if the key is empty or not. Key will be empty if it does not have
8585
* blocks.
86+
*
8687
* @param keyInfo
8788
* @return if empty true, else false.
8889
*/
8990
private boolean isKeyEmpty(@Nullable OmKeyInfo keyInfo) {
91+
if (keyInfo == null) {
92+
return true;
93+
}
9094
for (OmKeyLocationInfoGroup keyLocationList : keyInfo
9195
.getKeyLocationVersions()) {
9296
if (keyLocationList.getLocationList().size() != 0) {

hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/key/OMKeyPurgeResponse.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public class OMKeyPurgeResponse extends OMClientResponse {
3636

3737
private List<String> purgeKeyList;
3838

39-
public OMKeyPurgeResponse(List<String> keyList, @Nonnull OMResponse omResponse) {
39+
public OMKeyPurgeResponse(List<String> keyList,
40+
@Nonnull OMResponse omResponse) {
4041
super(omResponse);
4142
this.purgeKeyList = keyList;
4243
}

hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/key/OMKeyRenameResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public class OMKeyRenameResponse extends OMClientResponse {
3939
private final String toKeyName;
4040
private final String fromKeyName;
4141

42-
public OMKeyRenameResponse(@Nullable OmKeyInfo renameKeyInfo, String toKeyName,
43-
String fromKeyName, @Nonnull OMResponse omResponse) {
42+
public OMKeyRenameResponse(@Nullable OmKeyInfo renameKeyInfo,
43+
String toKeyName, String fromKeyName, @Nonnull OMResponse omResponse) {
4444
super(omResponse);
4545
this.renameKeyInfo = renameKeyInfo;
4646
this.toKeyName = toKeyName;

hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/s3/multipart/S3MultipartUploadAbortResponse.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public class S3MultipartUploadAbortResponse extends OMClientResponse {
4545
private OmMultipartKeyInfo omMultipartKeyInfo;
4646

4747
public S3MultipartUploadAbortResponse(String multipartKey,
48-
@Nullable OmMultipartKeyInfo omMultipartKeyInfo, @Nonnull OMResponse omResponse) {
48+
@Nullable OmMultipartKeyInfo omMultipartKeyInfo,
49+
@Nonnull OMResponse omResponse) {
4950
super(omResponse);
5051
this.multipartKey = multipartKey;
5152
this.omMultipartKeyInfo = omMultipartKeyInfo;

0 commit comments

Comments
 (0)