In message <[email protected]>,
Mark Hindess writes:
>
> While trying to find a smaller reproducer I noticed that:
>
> new HTMLEditorKit().read(new StringReader(
> "<html><body><pre></pre></body></html>"), doc, 0);
Oops. I missed that you still need:
System.out.println(doc.getText(0, 1));
to get the NPE.
> throws a NullPointerException[0] on r822846 but not before that commit.
> I assume it is related but of course it might not be.
>
> Regards,
> Mark.
>
> [0] ...
>
> Exception in thread "main" java.lang.NullPointerException
> at javax.swing.text.DefaultStyledDocument$ElementBuffer.insertEndTag(
> DefaultStyledDocument.java:602)
> at javax.swing.text.DefaultStyledDocument$ElementBuffer.performSpecs(
> DefaultStyledDocument.java:341)
> at javax.swing.text.DefaultStyledDocument$ElementBuffer.create(Defaul
> tStyledDocument.java:327)
> at javax.swing.text.DefaultStyledDocument.create(DefaultStyledDocumen
> t.java:1206)
> at javax.swing.text.html.HTMLDocument.access$2(HTMLDocument.java:1)
> at javax.swing.text.html.HTMLDocument$HTMLReader.flushImpl(HTMLDocume
> nt.java:864)
> at javax.swing.text.html.HTMLDocument$HTMLReader.flush(HTMLDocument.j
> ava:689)
> at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:737)
>
>