Skip to content

Commit b4fdb55

Browse files
committed
JShellWrapper changed the order of the timeout test to be after the handleevents
1 parent 902dabd commit b4fdb55

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

JShellWrapper/src/main/java/JShellWrapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ private EvalResult eval(JShell shell, String code, AtomicBoolean hasStopped) {
6666
break;
6767
}
6868
List<SnippetEvent> evalEvents = shell.eval(completion.source());
69-
if(hasStopped.get()) {
70-
abortion = new JShellEvalAbortion(completion.source(), completion.remaining(), new JShellEvalAbortionCause.TimeoutAbortionCause());
71-
break;
72-
}
7369
JShellEvalAbortionCause abortionCause = handleEvents(shell, evalEvents, resultEvents);
7470
if(abortionCause != null) {
7571
abortion = new JShellEvalAbortion(completion.source(), completion.remaining(), abortionCause);
7672
break;
7773
}
74+
if(hasStopped.get()) {
75+
abortion = new JShellEvalAbortion(completion.source(), completion.remaining(), new JShellEvalAbortionCause.TimeoutAbortionCause());
76+
break;
77+
}
7878
code = completion.remaining();
7979
} while(!code.isEmpty());
8080
return new EvalResult(resultEvents, abortion);

0 commit comments

Comments
 (0)