Fix #6105. Fix javadoc html errors.

Warnings and content are left as is aside from one spelling mistake in
an exception message.