We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68362fe commit 99b6f84Copy full SHA for 99b6f84
src/main/java/io/jenkins/plugins/restlistparam/logic/RestValueService.java
@@ -144,7 +144,11 @@ private static ResultContainer<String> getValueStringFromRestEndpoint(final Stri
144
try (Response response = client.newCall(request).execute()) {
145
int statusCode = response.code();
146
if (statusCode < 400) {
147
- container.setValue(response.body() != null ? response.body().string() : "");
+ String value = "";
148
+ okhttp3.ResponseBody body = response.body();
149
+ if (body != null)
150
+ value = body.string();
151
+ container.setValue(value);
152
}
153
else if (statusCode < 500) {
154
log.warning(Messages.RLP_RestValueService_warn_ReqClientErr(statusCode));
0 commit comments