Skip to content

Commit

Permalink
fix checkstyle spring-projects#2
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Jun 20, 2022
1 parent dacf0be commit b6317fc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,19 @@ abstract static class HttpPostCall extends Call.Base<Void> {

private final byte[] body;

public HttpPostCall(byte[] body) {
HttpPostCall(byte[] body) {
this.body = body;
}

public byte[] getBody() {
protected byte[] getBody() {
return getBody(true);
}

public byte[] getBody(boolean compressIfNeeded) {
return compressIfNeeded && needsCompression() ? compress(this.body) : this.body;
protected byte[] getBody(boolean compressIfNeeded) {
return (compressIfNeeded && needsCompression()) ? compress(this.body) : this.body;
}

public HttpHeaders getDefaultHeaders() {
protected HttpHeaders getDefaultHeaders() {
HttpHeaders headers = new HttpHeaders();
headers.set("b3", "0");
headers.set("Content-Type", "application/json");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public Call<Void> clone() {
@Override
protected Void doExecute() {
HttpEntity<byte[]> request = new HttpEntity<>(getBody(), getDefaultHeaders());
restTemplate.exchange(this.endpoint, HttpMethod.POST, request, Void.class);
this.restTemplate.exchange(this.endpoint, HttpMethod.POST, request, Void.class);
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected Void doExecute() {

@Override
protected void doEnqueue(Callback<Void> callback) {
sendRequest().subscribe(__ -> callback.onSuccess(null), callback::onError);
sendRequest().subscribe((__) -> callback.onSuccess(null), callback::onError);
}

private Mono<ResponseEntity<Void>> sendRequest() {
Expand Down

0 comments on commit b6317fc

Please sign in to comment.