mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-06 01:09:02 +00:00
Merge pull request #50451 from SebTardif
* fix-processrunner-interrupt-flag: Restore interrupt flag in ProcessRunner on InterruptedException Closes gh-50451
This commit is contained in:
+3
-1
@@ -122,7 +122,8 @@ class ProcessRunner {
|
||||
return process.waitFor();
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
throw new IllegalStateException("Interrupted waiting for %s".formatted(process));
|
||||
Thread.currentThread().interrupt();
|
||||
throw new IllegalStateException("Interrupted waiting for %s".formatted(process), ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,6 +175,7 @@ class ProcessRunner {
|
||||
return this.output.toString();
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
Thread.currentThread().interrupt();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user