Skip to content

Commit

Permalink
fix: ut
Browse files Browse the repository at this point in the history
  • Loading branch information
emptyOVO committed Nov 7, 2024
1 parent 9a38e26 commit daade42
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,10 @@ public boolean releaseProcessDef(String processDefUrl, long processDefCode, Stri

try {
JsonObject response = executeHttpRequest(url, HTTP_POST, queryParam, header, null);
return response.get(DS_RESPONSE_DATA).getAsBoolean();
if (response != null && !response.get(DS_RESPONSE_DATA).isJsonNull()) {
return response.get(DS_RESPONSE_DATA).getAsBoolean();
}
return false;
} catch (IOException e) {
LOGGER.error("Unexpected wrong in release process definition", e);
return false;
Expand Down Expand Up @@ -367,7 +370,7 @@ public boolean onlineScheduleForProcessDef(String scheduleUrl, int scheduleId, S
String url = scheduleUrl + "/" + scheduleId + DS_ONLINE_URL;
try {
JsonObject response = executeHttpRequest(url, HTTP_POST, new HashMap<>(), header, null);
if (response != null) {
if (response != null && !response.get(DS_RESPONSE_DATA).isJsonNull()) {
return response.get(DS_RESPONSE_DATA).getAsBoolean();
}
} catch (IOException e) {
Expand Down

0 comments on commit daade42

Please sign in to comment.