NullPointerException in XHTML ext. prov

I’'m sending a message to a Smack 1.4.0 client that has a XHTML body set, but accidentally I set the text to start with a html tag instead of a body tag. I found out that I was getting a NullPointerException on the client, and after some examination I realized that the parseExtension method in the XHTMLExtensionProvider class expects a body tag as the first tag in the message, otherwise the buffer is left uninitialized; as my first tag was “html,” it tried to append it to a null buffer.

Probably I’‘m sending bad formatted messages, but I think you’'ll agree that throwing a NPE that causes the client to be disconnected is a Denial-of-Service and not a feature.

THanks for your time!

Javier,

Thanks for the bug report. I filed a bug issue for the next release.

Regards,

– Gato