summaryrefslogtreecommitdiffstats
path: root/server/src/org/jsoup/parser/TreeBuilder.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/org/jsoup/parser/TreeBuilder.java')
-rw-r--r--server/src/org/jsoup/parser/TreeBuilder.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/server/src/org/jsoup/parser/TreeBuilder.java b/server/src/org/jsoup/parser/TreeBuilder.java
index e06caad501..5e2dbebc66 100644
--- a/server/src/org/jsoup/parser/TreeBuilder.java
+++ b/server/src/org/jsoup/parser/TreeBuilder.java
@@ -5,9 +5,6 @@ import org.jsoup.helper.Validate;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* @author Jonathan Hedley
*/
@@ -15,12 +12,15 @@ abstract class TreeBuilder {
CharacterReader reader;
Tokeniser tokeniser;
protected Document doc; // current doc we are building into
- protected DescendableLinkedList<Element> stack; // the stack of open elements
+ protected DescendableLinkedList<Element> stack; // the stack of open
+ // elements
protected String baseUri; // current base uri, for creating new elements
- protected Token currentToken; // currentToken is used only for error tracking.
+ protected Token currentToken; // currentToken is used only for error
+ // tracking.
protected ParseErrorList errors; // null when not tracking errors
- protected void initialiseParse(String input, String baseUri, ParseErrorList errors) {
+ protected void initialiseParse(String input, String baseUri,
+ ParseErrorList errors) {
Validate.notNull(input, "String input must not be null");
Validate.notNull(baseUri, "BaseURI must not be null");
@@ -47,8 +47,9 @@ abstract class TreeBuilder {
Token token = tokeniser.read();
process(token);
- if (token.type == Token.TokenType.EOF)
+ if (token.type == Token.TokenType.EOF) {
break;
+ }
}
}