When working with threads in Java, handling InterruptedException seems to be a special thorn in my direction. I appreciate the fact that it was thrown when my flows were stopped, and thus gives me the opportunity to clear. It seems strange to me that this is no exception.
This creates the following problems: a) If I want to use the existing infrastructure in my streaming application, I have to convert it to an exception that the framework interface accepts. Thus, a structure usually misinterprets it, rather than cleansing or distributing it as it should.
b) If an InterruptedException is not strictly declared for every call on the stack (and usually not because of a)), this makes it difficult to cleanly shut down.
If InterruptedException were disabled, it seems that it will have a much more likely hood for proper use, which will lead to a clean disconnection of threads and applications in general. Why is this not so?
source share