Skip to content

Commit 6caa3f2

Browse files
committed
Sonarqube: Either re-interrupt this method or rethrow the "InterruptedException"
1 parent 0828a15 commit 6caa3f2

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonCompiler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ protected void exec(List<String> args) {
6464
System.exit(status);
6565
}
6666
} catch (IOException | InterruptedException e) {
67+
Thread.currentThread().interrupt();
6768
throw new RuntimeException(e);
6869
}
6970
}

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonLD.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ void addFile(String f) {
176176
}
177177
nmProc.waitFor();
178178
} catch (InterruptedException | IOException e) {
179+
Thread.currentThread().interrupt();
179180
throw new RuntimeException(e);
180181
}
181182
}
@@ -196,6 +197,7 @@ private List<String> searchLib(List<String> libraryDirs, String lib) {
196197
try {
197198
bcFiles.addAll(arMembers(pathString));
198199
} catch (IOException | InterruptedException e) {
200+
Thread.currentThread().interrupt();
199201
throw new RuntimeException(e);
200202
}
201203
} else {

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonMain.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ private static void subExec(List<String> args, List<String> subProcessDefs) {
715715
try {
716716
System.exit(new ProcessBuilder(cmd.toArray(new String[0])).inheritIO().start().waitFor());
717717
} catch (IOException | InterruptedException e) {
718+
Thread.currentThread().interrupt();
718719
System.err.println(e.getMessage());
719720
System.exit(-1);
720721
}

0 commit comments

Comments
 (0)