Invalid "self-closing element not allowed" JavaDoc error

Nick Williams nicholas+openjdk at
Thu Jul 25 17:27:47 UTC 2013

My apologies if this is not the right place to address this. If so, please forgive and direct me to the correct list.

There are a lot of people/projects complaining about Java 8's new "self-closing element not allowed" error when compiling JavaDoc that has legal <br /> tags in it (just google "self-closing element not allowed" in quotes). Some (including myself) are asking, "Why should we fix this? The problem is not in the JavaDoc, it's in the JavDoc compiler." However, I haven't been able to find anyone who has actually broached the subject on any mailing lists.

<br /> is completely legal. While it is not strictly required by the HTML standard (unless you're using XHTML), using self-closing tags is /preferred/ because it's more obvious what the intention is. Perhaps most importantly, <br /> is supported on 100% of browsers and is used throughout JavaDoc all over the place. I have a feeling that once more projects start compiling on a released Java 8, this is going to make a fair number of people angry that hey have to "fix" (read: needlessly change) potentially thousands of classes' worth of JavaDoc.

What was the motivation behind the new "self-closing element not allowed" check and how can we make it go away?



More information about the core-libs-dev mailing list