Skip to content

Commit

Permalink
modified: src/main/java/org/jsoup/parser/StreamParser.java
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterChiefNemo committed Feb 4, 2024
1 parent 8d3bd93 commit 895ca0b
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/main/java/org/jsoup/parser/StreamParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ interface to the document and its elements.</p>
@since 1.18.1
*/
public class StreamParser implements Closeable {
final private Parser parser;
final private TreeBuilder treeBuilder;
final private ElementIterator it = new ElementIterator();
private final Parser parser;
private final TreeBuilder treeBuilder;
private final ElementIterator it = new ElementIterator();
@Nullable private Document document;
private boolean stopped = false;

Expand Down Expand Up @@ -294,7 +294,7 @@ public Element expectNext(String query) throws IOException {

final class ElementIterator implements Iterator<Element>, NodeVisitor {
// listeners add to a next emit queue, as a single token read step may yield multiple elements
final private Queue<Element> emitQueue = new LinkedList<>();
private final Queue<Element> emitQueue = new LinkedList<>();
private @Nullable Element current; // most recently emitted
private @Nullable Element next; // element waiting to be picked up
private @Nullable Element tail; // The last tailed element (</html>), on hold for final pop
Expand Down Expand Up @@ -375,7 +375,4 @@ private void maybeFindNext() {
}
}
}
}



}

0 comments on commit 895ca0b

Please sign in to comment.