src/jdk.jshell/share/classes/jdk/internal/jshell/tool/StopDetectingInputStream.java
equal
deleted
inserted
replaced
111 state = State.CLOSED; |
111 state = State.CLOSED; |
112 notifyAll(); |
112 notifyAll(); |
113 } |
113 } |
114 |
114 |
115 public synchronized void write(int b) { |
115 public synchronized void write(int b) { |
116 if (state != State.BUFFER) { |
116 if (state == State.READ) { |
117 state = State.WAIT; |
117 state = State.WAIT; |
118 } |
118 } |
119 int newEnd = (end + 1) % buffer.length; |
119 int newEnd = (end + 1) % buffer.length; |
120 if (newEnd == start) { |
120 if (newEnd == start) { |
121 //overflow: |
121 //overflow: |