Skip to content

Commit

Permalink
backward compatibility fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brig committed Feb 13, 2025
1 parent cd19e05 commit 1a3fb8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class ParallelExecutionException extends RuntimeException {

@Serial
private static final long serialVersionUID = 1L;

private static final int MAX_STACK_TRACE_ELEMENTS = 3;
private final List<ThreadError> exceptions;

Expand All @@ -49,8 +49,8 @@ public ParallelExecutionException(Collection<ThreadError> causes) {
this.exceptions = new ArrayList<>(causes);
}

public List<ThreadError> getExceptions() {
return exceptions;
public List<Exception> getExceptions() {
return exceptions.stream().map(ThreadError::exception).toList();
}

private static String toMessage(Collection<ThreadError> causes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void serialize(ParallelExecutionException exception, JsonGenerator gen, S

gen.writeArrayFieldStart("exceptions");
for (var e : exception.getExceptions()) {
gen.writeObject(e.exception());
gen.writeObject(e);
}
gen.writeEndArray();

Expand Down

0 comments on commit 1a3fb8d

Please sign in to comment.