fb-contrib icon indicating copy to clipboard operation
fb-contrib copied to clipboard

HES_EXECUTOR_NEVER_SHUTDOWN false positive

Open boris-petrov opened this issue 6 years ago • 2 comments

When a custom ThreadFactory is passed which sets the threads as daemon ones, this warning is falsy because daemon threads do not stop the JVM from exiting. Not sure how complex this is to fix though.

boris-petrov avatar Jul 22 '19 13:07 boris-petrov

looking at the code, it tries to set the priority to LOW if it sees a ThreadFactory being passed. Is this happening, at least?

mebigfatguy avatar Jul 28 '19 05:07 mebigfatguy

@mebigfatguy - yes, it marks it as low priority.

Another interesting thing is that when using Executors.newSingleThreadScheduledExecutor - this HES_EXECUTOR_NEVER_SHUTDOWN warning does not get triggered. It does only when doing new ThreadPoolExecutor. I guess this is a false negative.

boris-petrov avatar Jul 29 '19 12:07 boris-petrov