Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8020619

error: self-closing element not allowed

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 8
    • Fix Version/s: None
    • Component/s: tools
    • Labels:

      Description

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      It appears that Javadoc no longer support self closing elements like <p/> and <br/>

      Is there a good reason for this because changing all my Javadocs to remove/modify these doesn't seem to be a good use of anyone's time.

      I know Javadoc nevers used XHTML, but dropping support for it doesn't seem helpful.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Use <p/> or <br/> in your Javadoc

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Works like in XHTML
      ACTUAL -
      an error

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      error: self-closing element not allowed

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      turn everything back into HTML.

      SUPPORT :
      YES

        Issue Links

          Activity

          Hide
          ssides Steve Sides added a comment - - edited
          This is not a bug but a new "doclint" feature in javac and javadoc. The option is -Xdoclint.
          This is disabled by default in javac(opt-in) and enabled by default in javadoc(opt-out).
          "self-closing tags" such as <br /> are acceptable xhtml but not html.
          The check can be disabled using -Xdoclint:none.

          Show
          ssides Steve Sides added a comment - - edited This is not a bug but a new "doclint" feature in javac and javadoc. The option is -Xdoclint. This is disabled by default in javac(opt-in) and enabled by default in javadoc(opt-out). "self-closing tags" such as <br /> are acceptable xhtml but not html. The check can be disabled using -Xdoclint:none.
          Hide
          jjg Jonathan Gibbons added a comment - - edited
          There is a good reason -- self closing tags are not legal in HTML and we have updated javadoc to better enforce valid javadoc comments.

          It should be easy enough to go a global edit of <p/> to either <p> or <p></p> depending on what effect you think you are trying to achieve.
          Show
          jjg Jonathan Gibbons added a comment - - edited There is a good reason -- self closing tags are not legal in HTML and we have updated javadoc to better enforce valid javadoc comments. It should be easy enough to go a global edit of <p/> to either <p> or <p></p> depending on what effect you think you are trying to achieve.

            People

            • Assignee:
              ssides Steve Sides
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: