I am using java.util.concurrent.ExecutorService.submit(Callable<T>) to invoke Callable tasks that return void. The reason that we chose Callable over Runnable was to leverage the ability of Callable to throw a checked exception because we don’t really have a result. After moving to Findbugs 2.0, calls to submit are being flagged as violations because we are ignoring exceptional return value. Just wanted to check if this is a fair violation – because there is isn’t much I want to do anyway with checking the return value.
Thanks in advance!
If you are using Callable because it can throw an exception then it seems that you would want to grab and check the Future to see if the exception was thrown. Otherwise, you are designing code to throw a checked exception but never handling it.