We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ca767e commit ff1e477Copy full SHA for ff1e477
logstash-core/src/main/java/org/logstash/common/BufferedTokenizer.java
@@ -120,6 +120,11 @@ public String flush() {
120
return flushed;
121
}
122
123
+ // considered empty if caught up to the accumulator
124
+ public synchronized boolean isBufferEmpty() {
125
+ return currentIdx >= accumulator.length();
126
+ }
127
+
128
@Override
129
public synchronized String toString() {
130
return "accumulator=" + accumulator + ", currentIdx=" + currentIdx;
@@ -171,6 +176,7 @@ public String toString() {
171
176
172
177
173
178
public boolean isEmpty() {
174
- return !dataSplitter.hasNext();
179
+// return !dataSplitter.hasNext();
180
+ return dataSplitter.isBufferEmpty();
175
181
182
0 commit comments