In ProcessRunner, two InterruptedException catch blocks do not restore the thread's interrupt flag before re-throwing or returning:
waitForProcess (line 140): catches InterruptedException, throws IllegalStateException without calling Thread.currentThread().interrupt() first, and without chaining the original exception.
ReaderThread.toString (line 192): catches InterruptedException and returns "" without restoring the interrupt flag.
This is inconsistent with every other InterruptedException handler in the codebase (e.g., LogbackLoggingSystem, SpringApplicationShutdownHook, ServiceReadinessChecks, FileWatcher, OnClassCondition) which all restore the flag.
Without restoring the flag, code higher in the call stack (such as Docker Compose lifecycle shutdown handling) cannot detect that the thread was interrupted.
In
ProcessRunner, twoInterruptedExceptioncatch blocks do not restore the thread's interrupt flag before re-throwing or returning:waitForProcess(line 140): catchesInterruptedException, throwsIllegalStateExceptionwithout callingThread.currentThread().interrupt()first, and without chaining the original exception.ReaderThread.toString(line 192): catchesInterruptedExceptionand returns""without restoring the interrupt flag.This is inconsistent with every other
InterruptedExceptionhandler in the codebase (e.g.,LogbackLoggingSystem,SpringApplicationShutdownHook,ServiceReadinessChecks,FileWatcher,OnClassCondition) which all restore the flag.Without restoring the flag, code higher in the call stack (such as Docker Compose lifecycle shutdown handling) cannot detect that the thread was interrupted.