Skip to content

Commit

Permalink
fixes [Enhancement] apache#3963
Browse files Browse the repository at this point in the history
  • Loading branch information
ZahaanMahajan committed May 19, 2023
1 parent 39324be commit 48fc238
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.io.IOException;
import java.io.OutputStream;

import java.util.Objects;

import com.sun.net.httpserver.HttpExchange;

Expand Down Expand Up @@ -60,7 +61,7 @@ public void handle(HttpExchange httpExchange) throws IOException {

try (OutputStream out = httpExchange.getResponseBody()) {
WebHookConfig result = operation.queryWebHookConfigById(webHookConfig); // operating result
out.write(JsonUtils.toJSONString(result).getBytes(Constants.DEFAULT_CHARSET));
out.write(Objects.requireNonNull(JsonUtils.toJSONString(result).getBytes(Constants.DEFAULT_CHARSET)));
} catch (Exception e) {
log.error("get WebHookConfigOperation implementation Failed.", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void handle(HttpExchange httpExchange) throws IOException {

try (OutputStream out = httpExchange.getResponseBody()) {
List<WebHookConfig> result = operation.queryWebHookConfigByManufacturer(webHookConfig, pageNum, pageSize); // operating result
out.write(JsonUtils.toJSONString(result).getBytes(Constants.DEFAULT_CHARSET));
out.write(Objects.requireNonNull(JsonUtils.toJSONString(result).getBytes(Constants.DEFAULT_CHARSET)));
} catch (Exception e) {
log.error("get WebHookConfigOperation implementation Failed.", e);
}
Expand Down

0 comments on commit 48fc238

Please sign in to comment.