Skip to content

Commit 3e0a0e7

Browse files
committed
style: remove bracket for if/else
1 parent b43965f commit 3e0a0e7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/java/swurg/workers/Worker.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,9 @@ public List<MyHttpRequest> parseOpenAPI(OpenAPI openAPI) {
102102
.withAddedParameters(httpParameters);
103103

104104
int contentLength = httpRequest.body().length();
105-
if (contentLength > 0) {
105+
if (contentLength > 0)
106106
httpRequest = httpRequest.withAddedHeader(HttpHeader
107107
.httpHeader("content-length", String.valueOf(contentLength)));
108-
}
109108

110109
logEntries.add(new MyHttpRequest(httpRequest, op.getDescription()));
111110
} catch (URISyntaxException e) {
@@ -169,11 +168,10 @@ private List<HttpParameter> buildHttpRequestParameters(List<Parameter> parameter
169168
.map(Schema::getType)
170169
.orElse(null);
171170

172-
if ("header".equals(in)) {
171+
if ("header".equals(in))
173172
httpParameters.add(HttpParameter.cookieParameter(name, value));
174-
} else if ("query".equals(in)) {
173+
else if ("query".equals(in))
175174
httpParameters.add(HttpParameter.urlParameter(name, value));
176-
}
177175
}));
178176

179177
Optional.ofNullable(requestBody)

0 commit comments

Comments
 (0)