Interrupting a thread from ShutdownHook doesn’t close resources
I have following code with a try-with-resources which creates two resources and it works fine:
I have following code with a try-with-resources which creates two resources and it works fine: