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

The javadoc parser ends the first sentence of a comment too soon.

    Details

      Description

      A DESCRIPTION OF THE PROBLEM :
      (This issue is operating-system-independent).

      Looking at this Web page: https://docs.oracle.com/en/java/javase/12/docs/api/java.xml/org/w3c/dom/package-summary.html

      Under the first sentence for the class DomLocator: "DOMLocator is an interface that describes a location (e.g."

      It appears that the javadoc tool incorrectly recognizes the period at the end of "e.g." as the end of the first sentence, when in actuality, it is not. This seems to be a regular expression or substring search that looks for a period followed by a blank or the end of the string.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      No reproduce necessary, but you can try this with your own javadoc generator. Have a first sentence in a JavaDoc comment that has a period somewhere in the middle (like with i.e. or e.g.) and the parser will think that is the end of the first sentence.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The parser should go to the actual end of the first sentence.
      ACTUAL -
      The parser stops the search at the point of the period followed by a blank instead of the end of the sentence.

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              prappo Pavel Rappo
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: