Skip to content

Commit 9435507

Browse files
Christopher-Chianellitriceo
authored andcommitted
chore: Make overridden synchronized Throwable methods synchronized
1 parent 8ac2833 commit 9435507

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

jpyinterpreter/src/main/java/ai/timefold/jpyinterpreter/types/errors/GeneratorExit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public GeneratorExit(PythonLikeType type, List<PythonLikeObject> args) {
4545
* @return this
4646
*/
4747
@Override
48-
public Throwable fillInStackTrace() {
48+
public synchronized Throwable fillInStackTrace() {
4949
// Do nothing
5050
return this;
5151
}

jpyinterpreter/src/main/java/ai/timefold/jpyinterpreter/types/errors/PythonBaseException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public PythonBaseException(PythonLikeType type, String message) {
6565
}
6666

6767
@Override
68-
public Throwable initCause(Throwable cause) {
68+
public synchronized Throwable initCause(Throwable cause) {
6969
super.initCause(cause);
7070
if (cause instanceof PythonLikeObject pythonError) {
7171
$setAttribute("__cause__", pythonError);

jpyinterpreter/src/main/java/ai/timefold/jpyinterpreter/types/errors/StopAsyncIteration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public PythonLikeObject getValue() {
4848
* @return this
4949
*/
5050
@Override
51-
public Throwable fillInStackTrace() {
51+
public synchronized Throwable fillInStackTrace() {
5252
// Do nothing
5353
return this;
5454
}

jpyinterpreter/src/main/java/ai/timefold/jpyinterpreter/types/errors/StopIteration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public PythonLikeObject getValue() {
4949
* @return this
5050
*/
5151
@Override
52-
public Throwable fillInStackTrace() {
52+
public synchronized Throwable fillInStackTrace() {
5353
// Do nothing
5454
return this;
5555
}

0 commit comments

Comments
 (0)