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

javadoc with valid url containing ampersand is rejected

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      a valid url like "* <a href='http://svg.tutorial.aptico.de/start2.php?knr=8&kname=Text&#39;>" is rejected by the java doc tool because of the ampersand "&". This happens (paradoxically) when the commandline option "-Xdoclint:-html" is given.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      invoke from the commandline
      dir$javadoc -sourcepath . -d . -Xdoclint:-html Test.java
      after putting the source file Test.java (given below) into this directory "dir"

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Create documentation without any warning.
      ACTUAL -
      Generating ./Test.html...
      Test.java:1: warning: invalid input: '&kname'
        /** <a href='http://svg.tutorial.aptico.de/start2.php?knr=8&kname=Text&#39;>


      ---------- BEGIN SOURCE ----------
        /** <a href='http://x?knr=8&kname=Text&#39;> link text</a> */
      public class Test {}

      ---------- END SOURCE ----------

      FREQUENCY : always


            rreddy Ravi Reddy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: