Commit 8a28cef
Restore interrupt flag in ProcessRunner on InterruptedException
ProcessRunner.waitForProcess and ReaderThread.toString catch
InterruptedException without restoring the thread interrupt flag.
This prevents callers higher up the stack from detecting the
interruption. Every other InterruptedException handler in the
codebase restores the flag; these two were the only omissions.
Add Thread.currentThread().interrupt() before re-throwing or
returning in both catch blocks. Also chain the original exception
as the cause in waitForProcess for debuggability.
See gh-50451
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>1 parent 3e5ad73 commit 8a28cef
1 file changed
Lines changed: 3 additions & 1 deletion
File tree
- spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/core
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| |||
0 commit comments