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 1515import java .io .PrintWriter ;
1616import java .nio .charset .Charset ;
1717import java .util .Objects ;
18- import java .util .concurrent .atomic .AtomicBoolean ;
1918
2019import org .jline .terminal .spi .Pty ;
2120import org .jline .utils .ClosedException ;
@@ -146,23 +145,23 @@ public boolean paused() {
146145 private static class InputStreamWrapper extends NonBlockingInputStream {
147146
148147 private final NonBlockingInputStream in ;
149- private final AtomicBoolean closed = new AtomicBoolean () ;
148+ private volatile boolean closed ;
150149
151150 protected InputStreamWrapper (NonBlockingInputStream in ) {
152151 this .in = in ;
153152 }
154153
155154 @ Override
156155 public int read (long timeout , boolean isPeek ) throws IOException {
157- if (closed . get () ) {
156+ if (closed ) {
158157 throw new ClosedException ();
159158 }
160159 return in .read (timeout , isPeek );
161160 }
162161
163162 @ Override
164163 public void close () throws IOException {
165- closed . set ( true ) ;
164+ closed = true ;
166165 }
167166 }
168167
You can’t perform that action at this time.
0 commit comments