Skip to content

Commit

Permalink
Fix boolean condition to don't evaluate both sides
Browse files Browse the repository at this point in the history
  • Loading branch information
en-milie committed Nov 9, 2023
1 parent 145c072 commit 4036d97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/endava/cats/io/ServiceCaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ private void addMandatoryHeaders(ServiceData data, List<KeyValuePair<String, Obj
}

private String getContentType(HttpMethod method, String defaultContentType) {
return method == HttpMethod.PATCH & processingArguments.isRfc7396() ? ProcessingArguments.JSON_PATCH : defaultContentType;
return method == HttpMethod.PATCH && processingArguments.isRfc7396() ? ProcessingArguments.JSON_PATCH : defaultContentType;
}

private void addIfNotPresent(String headerName, String headerValue, ServiceData data, List<KeyValuePair<String, Object>> headers) {
Expand Down

0 comments on commit 4036d97

Please sign in to comment.