File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
terminal/src/main/java/org/jline/terminal/impl Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 15
15
import java .io .PrintWriter ;
16
16
import java .nio .charset .Charset ;
17
17
import java .util .Objects ;
18
- import java .util .concurrent .atomic .AtomicBoolean ;
19
18
20
19
import org .jline .terminal .spi .Pty ;
21
20
import org .jline .utils .ClosedException ;
@@ -146,23 +145,23 @@ public boolean paused() {
146
145
private static class InputStreamWrapper extends NonBlockingInputStream {
147
146
148
147
private final NonBlockingInputStream in ;
149
- private final AtomicBoolean closed = new AtomicBoolean () ;
148
+ private volatile boolean closed ;
150
149
151
150
protected InputStreamWrapper (NonBlockingInputStream in ) {
152
151
this .in = in ;
153
152
}
154
153
155
154
@ Override
156
155
public int read (long timeout , boolean isPeek ) throws IOException {
157
- if (closed . get () ) {
156
+ if (closed ) {
158
157
throw new ClosedException ();
159
158
}
160
159
return in .read (timeout , isPeek );
161
160
}
162
161
163
162
@ Override
164
163
public void close () throws IOException {
165
- closed . set ( true ) ;
164
+ closed = true ;
166
165
}
167
166
}
168
167
You can’t perform that action at this time.
0 commit comments