Skip to content

Commit 544601c

Browse files
committed
Synchronize display call
- In TerminalUI a display call may be called from multiple threads, while only seen to happen on windows, should be synchronized. - Fixes #1039
1 parent c4e6cc9 commit 544601c

File tree

1 file changed

+2
-2
lines changed
  • spring-shell-core/src/main/java/org/springframework/shell/component/view

1 file changed

+2
-2
lines changed

spring-shell-core/src/main/java/org/springframework/shell/component/view/TerminalUI.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 the original author or authors.
2+
* Copyright 2023-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -257,7 +257,7 @@ public void setNonfullScreenViewRect(BiFunction<Terminal, View, Rectangle> nonfu
257257
this.nonfullScreenViewRect = nonfullScreenViewRect;
258258
}
259259

260-
private void display() {
260+
private synchronized void display() {
261261
log.trace("display() start");
262262
size.copy(terminal.getSize());
263263
if (fullScreen) {

0 commit comments

Comments
 (0)