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

-Xdoclint:all returns warning for records, even when documented properly

XMLWordPrintable

    • b20
    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      System agnostic -- problem shows up on all systems

      A DESCRIPTION OF THE PROBLEM :
      When using the command line tool -Xdoclint, I receive a warning on my record, even when I have documented them properly.



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile the executable test case with the following command

      javac XdoclintDoesntHandleRecordJavadocCorrectly.java -Xdoclint:all

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I expect it to compile without warnings
      ACTUAL -
      Instead, I get this output

      XdoclintDoesntHandleRecordJavadocCorrectly.java:14: warning: no comment
      int a,
          ^
      XdoclintDoesntHandleRecordJavadocCorrectly.java:16: warning: no comment
      int b,
          ^
      XdoclintDoesntHandleRecordJavadocCorrectly.java:18: warning: no comment
      int c
          ^
      3 warnings


      ---------- BEGIN SOURCE ----------
      /**
       *
       * Comment.
       *
       * @param a Comment.
       * @param b Comment.
       * @param c Comment.
       *
       */
      public record XdoclintDoesntHandleRecordJavadocCorrectly(
      /** Comment. */
      int a,
      /** b Comment. */
      int b,
      /** @param c Comment. */
      int c
      ) {}
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      None really, aside from just turning off the warnings

      FREQUENCY : always


            jjg Jonathan Gibbons
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: