Skip to content

Commit

Permalink
Merge pull request #421 from KamToHung/fix-420
Browse files Browse the repository at this point in the history
[ISSUE #420] taskName is null
  • Loading branch information
yanhom1314 committed Apr 14, 2024
2 parents 3c41ef1 + 5e24ffb commit a4af4d1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ public interface TaskEnhanceAware extends DtpAware {
*/
default Runnable getEnhancedTask(Runnable command, List<TaskWrapper> taskWrappers) {
Runnable wrapRunnable = command;
String taskName = (wrapRunnable instanceof NamedRunnable) ? ((NamedRunnable) wrapRunnable).getName() : null;
if (CollectionUtils.isNotEmpty(taskWrappers)) {
for (TaskWrapper t : taskWrappers) {
wrapRunnable = t.wrap(wrapRunnable);
}
}
String taskName = (wrapRunnable instanceof NamedRunnable) ? ((NamedRunnable) wrapRunnable).getName() : null;
return new DtpRunnable(command, wrapRunnable, taskName);
}

Expand Down

0 comments on commit a4af4d1

Please sign in to comment.