Skip to content

Commit

Permalink
minor improvement to condition for after execute.
Browse files Browse the repository at this point in the history
Co-authored-by: Harshit Singh Lodha <[email protected]>
  • Loading branch information
lovesh-ap and harshit-ap committed Aug 3, 2023
1 parent c0a4127 commit 4c35ed5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ protected void afterExecute(Runnable r, Throwable t) {
try {
super.afterExecute(r, t);
String controlCommandId = null;
if (t != null && r instanceof CustomFutureTask<?> && ((CustomFutureTask<?>) r).getTask() instanceof RestRequestProcessor) {
if (r instanceof CustomFutureTask<?> && ((CustomFutureTask<?>) r).getTask() instanceof RestRequestProcessor) {
Boolean result = (Boolean) ((CustomFutureTask<?>) r).get();
if(result) {
RestRequestProcessor task = (RestRequestProcessor) ((CustomFutureTask<?>) r).getTask();
controlCommandId = task.getControlCommand().getId();
RestRequestProcessor task = (RestRequestProcessor) ((CustomFutureTask<?>) r).getTask();
controlCommandId = task.getControlCommand().getId();
if(t == null && result) {
if (StringUtils.isNotBlank(controlCommandId)) {
if (currentProcessingIds.containsKey(controlCommandId)) {
processedIds.put(controlCommandId, currentProcessingIds.get(controlCommandId));
Expand Down

0 comments on commit 4c35ed5

Please sign in to comment.