Skip to content

Fix null pointer exception in XhtmlParser #261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 26, 2018

Conversation

ashawley
Copy link
Member

Fixes #259.

This one-line change seems low enough risk that it could be included in the next bug-fix release.

@ashawley ashawley added this to the 1.1.1 milestone Sep 21, 2018
Make characters, including whitespace, after the `html' identifier in
<!DOCTYPE html> be optional.  Otherwise, the following errors are
emitted:

    file.xml:2:15: whitespace expected<html xmlns="http://www.w3.org/1999/xhtml">              ^
    file.xml:2:15: document must contain exactly one element

And a java.lang.NullPointerException is thrown.

Unfortunately, testing with Source.fromString doesn't reproduce the
NullPointerException that occurs with Source.fromFile.
@ashawley ashawley merged commit 72b1c11 into scala:master Sep 26, 2018
@ashawley ashawley deleted the fix-html5-npe branch September 26, 2018 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XhtmlParser throws java.lang.NullPointerException with valid doctype
1 participant