Skip to content

Commit eafd359

Browse files
committed
unnecessary null check before equals call
1 parent 66182c2 commit eafd359

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/main/java/com/bettercloud/vault/api

src/main/java/com/bettercloud/vault/api/Auth.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ public LookupResponse lookupSelf(final String tokenAuthMount) throws VaultExcept
12281228
throw new VaultException("Vault responded with HTTP status code: " + restResponse.getStatus(), restResponse.getStatus());
12291229
}
12301230
final String mimeType = restResponse.getMimeType();
1231-
if (mimeType == null || !"application/json".equals(mimeType)) {
1231+
if (!"application/json".equals(mimeType)) {
12321232
throw new VaultException("Vault responded with MIME type: " + mimeType, restResponse.getStatus());
12331233
}
12341234
return new LookupResponse(restResponse, retryCount);
@@ -1291,7 +1291,7 @@ public LogicalResponse lookupWrap() throws VaultException {
12911291
restResponse.getStatus());
12921292
}
12931293
final String mimeType = restResponse.getMimeType();
1294-
if (mimeType == null || !"application/json".equals(mimeType)) {
1294+
if (!"application/json".equals(mimeType)) {
12951295
throw new VaultException("Vault responded with MIME type: " + mimeType, restResponse.getStatus());
12961296
}
12971297
return new LogicalResponse(restResponse, retryCount, Logical.logicalOperations.authentication);

0 commit comments

Comments
 (0)