HDDS-2182. Fix checkstyle violations introduced by HDDS-1738

Closes #1529
This commit is contained in:
Vivek Ratnavel Subramanian 2019-09-26 12:09:28 +02:00 committed by Márton Elek
parent 587a8eeec8
commit 7b6219a8d1
No known key found for this signature in database
GPG Key ID: D51EA8F00EE79B28
6 changed files with 15 additions and 9 deletions

View File

@ -25,7 +25,6 @@ import org.apache.hadoop.ozone.om.response.OMClientResponse;
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos;
import org.apache.hadoop.hdds.utils.db.BatchOperation;
import javax.annotation.Nullable;
import javax.annotation.Nonnull;
/**

View File

@ -36,7 +36,8 @@ public class OMKeyCommitResponse extends OMClientResponse {
private OmKeyInfo omKeyInfo;
private long openKeySessionID;
public OMKeyCommitResponse(@Nullable OmKeyInfo omKeyInfo, long openKeySessionID,
public OMKeyCommitResponse(@Nullable OmKeyInfo omKeyInfo,
long openKeySessionID,
@Nonnull OzoneManagerProtocolProtos.OMResponse omResponse) {
super(omResponse);
this.omKeyInfo = omKeyInfo;

View File

@ -38,8 +38,8 @@ import javax.annotation.Nonnull;
public class OMKeyDeleteResponse extends OMClientResponse {
private OmKeyInfo omKeyInfo;
public OMKeyDeleteResponse(@Nullable OmKeyInfo omKeyInfo, @Nonnull OMResponse omResponse) {
public OMKeyDeleteResponse(@Nullable OmKeyInfo omKeyInfo,
@Nonnull OMResponse omResponse) {
super(omResponse);
this.omKeyInfo = omKeyInfo;
}
@ -83,10 +83,14 @@ public class OMKeyDeleteResponse extends OMClientResponse {
/**
* Check if the key is empty or not. Key will be empty if it does not have
* blocks.
*
* @param keyInfo
* @return if empty true, else false.
*/
private boolean isKeyEmpty(@Nullable OmKeyInfo keyInfo) {
if (keyInfo == null) {
return true;
}
for (OmKeyLocationInfoGroup keyLocationList : keyInfo
.getKeyLocationVersions()) {
if (keyLocationList.getLocationList().size() != 0) {

View File

@ -36,7 +36,8 @@ public class OMKeyPurgeResponse extends OMClientResponse {
private List<String> purgeKeyList;
public OMKeyPurgeResponse(List<String> keyList, @Nonnull OMResponse omResponse) {
public OMKeyPurgeResponse(List<String> keyList,
@Nonnull OMResponse omResponse) {
super(omResponse);
this.purgeKeyList = keyList;
}

View File

@ -39,8 +39,8 @@ public class OMKeyRenameResponse extends OMClientResponse {
private final String toKeyName;
private final String fromKeyName;
public OMKeyRenameResponse(@Nullable OmKeyInfo renameKeyInfo, String toKeyName,
String fromKeyName, @Nonnull OMResponse omResponse) {
public OMKeyRenameResponse(@Nullable OmKeyInfo renameKeyInfo,
String toKeyName, String fromKeyName, @Nonnull OMResponse omResponse) {
super(omResponse);
this.renameKeyInfo = renameKeyInfo;
this.toKeyName = toKeyName;

View File

@ -45,7 +45,8 @@ public class S3MultipartUploadAbortResponse extends OMClientResponse {
private OmMultipartKeyInfo omMultipartKeyInfo;
public S3MultipartUploadAbortResponse(String multipartKey,
@Nullable OmMultipartKeyInfo omMultipartKeyInfo, @Nonnull OMResponse omResponse) {
@Nullable OmMultipartKeyInfo omMultipartKeyInfo,
@Nonnull OMResponse omResponse) {
super(omResponse);
this.multipartKey = multipartKey;
this.omMultipartKeyInfo = omMultipartKeyInfo;