NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 687 - java.lang.NullPointerException in HtmlBuilder contructor
java.lang.NullPointerException in HtmlBuilder contructor
Status: NEW
Product: Validator.nu
Classification: Unclassified
Component: HTML parser
HEAD
All All
: P2 normal
Assigned To: Nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-29 12:30 CET by Jozef Izso
Modified: 2009-11-29 12:45 CET (History)
0 users

See Also:


Attachments
Commented out driver.setXmlnsPolicy() in HtmlBuilder constructor (it's set in lazyInit()). (609 bytes, patch)
2009-11-29 12:45 CET, Jozef Izso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jozef Izso 2009-11-29 12:30:11 CET
HtmlBuilder constructor sets driver field to null and then calls setXmlnsPolicy() method on it which casues NullPointerException.

public HtmlBuilder(SimpleNodeFactory nodeFactory, XmlViolationPolicy xmlPolicy) {
        super();
        this.simpleNodeFactory = nodeFactory;
        this.treeBuilder = new XOMTreeBuilder(nodeFactory);
        this.driver = null;
        this.driver.setXmlnsPolicy(XmlViolationPolicy.ALTER_INFOSET);
        setXmlPolicy(xmlPolicy);
}
Comment 1 Jozef Izso 2009-11-29 12:45:55 CET
Created attachment 130 [details]
Commented out driver.setXmlnsPolicy() in HtmlBuilder constructor (it's set in lazyInit()).