It is not possible to change the max pool size of a ScheduledThreadPoolExecutor
using the setter functions inherited from ThreadPoolExecutor
.
The code contains an empty synchronized block. This could confuse readers of this code later.
A Thread
object is passed as a parameter to a method where a Runnable
is expected. This is rather unusual, and may indicate a logic error or cause unexpected behavior.
When a catch
clause is empty, it essentially ignores any occurrences of the particular exception it handles. This could allow critical bugs to go undiagnosed because any relevant exceptions indicative of a bug would be discarded within this catch
block.
The code performs a shift of an int
or long
by a constant amount outside the acceptable range. This could potentially cause overflow or other similar errors and is at best very confusing.