HTML parser throws AssertionErrors when -enableassertions is set
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Read nu.validator.htmlparser.impl.Tokenizer, especially clearStrBufBeforeUse and stateLoop, then reproduce the failure through the parse call chain shown in the trace with assertions enabled. Done means the HTML parser no longer throws the reported AssertionError in that environment.
Written by the indexing model from the issue text.
Description
HTML parser throws AssertionErrors when -enableassertions is set. This makes it difficult to use the validator in test environments where assertions are often enabled.
Caused by: java.lang.AssertionError: strBufLen not reset after previous use!
at nu.validator.htmlparser.impl.Tokenizer.clearStrBufBeforeUse(Tokenizer.java:852)
at nu.validator.htmlparser.impl.Tokenizer.stateLoop(Tokenizer.java:1561)
at nu.validator.htmlparser.impl.Tokenizer.tokenizeBuffer(Tokenizer.java:1341)
at nu.validator.htmlparser.io.Driver.runStates(Driver.java:320)
at nu.validator.htmlparser.io.Driver.tokenize(Driver.java:219)
at nu.validator.htmlparser.sax.HtmlParser.tokenize(HtmlParser.java:488)
at nu.validator.htmlparser.sax.HtmlParser.parse(HtmlParser.java:408)
at nu.validator.xml.WiretapXMLReaderWrapper.parse(WiretapXMLReaderWrapper.java:158)
at nu.validator.validation.SimpleDocumentValidator.checkAsHTML(SimpleDocumentValidator.java:523)
at nu.validator.validation.SimpleDocumentValidator.checkHtmlInputSource(SimpleDocumentValidator.java:405)
- Dominant language
- Java
- Stars
- 65
- Forks
- 29
- Avg merge
- 11d 21h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from validator/htmlparser
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
validator/htmlparser#98 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
validator/htmlparser#96 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
validator/htmlparser#95 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
validator/htmlparser#87 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
validator/htmlparser#79 ·
All issues in validator/htmlparser
Similar issues
-
bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
opensearch-project/ml-commons#5094 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
emitter:client:csharp feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100