Skip to content

Commit

Permalink
MyGearmanWorkerImpl: fix RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
Browse files Browse the repository at this point in the history
Spotbugs complains about ExecutorService.submit() return value being
ignored. The returned Future is unneeded, just assign it to a variable
and forget about it.
  • Loading branch information
hashar committed Jan 17, 2022
1 parent a408cb5 commit e031ce9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,8 @@ private void submitFunction(GearmanFunction fun) {
if (executorService == null) {
fun.call();
} else {
executorService.submit(fun);
// The future is not used, we watch it via driveSessionIO()
Future task = executorService.submit(fun);
}

// We should have submitted either a WORK_EXCEPTION, COMPLETE,
Expand Down

0 comments on commit e031ce9

Please sign in to comment.