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

javadoc: @code tag does not allow multiline contents including '@' sign

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8, 9
    • Fix Version/s: tbd_minor
    • Component/s: tools
    • Labels:
      None

      Description

      Please try:

        /**
         * {@code
         * &one
         * &two}
         */
      - ok

        /**
         * {@code @one @two}
         */
      - ok

      but
        /**
         * {@code
         * @one
         * @two}
         */
      - fails:

      JavadocTest.java:4: error: unterminated inline tag
           * {@code
             ^
      JavadocTest.java:5: error: unknown tag: one
           * @one
             ^
      JavadocTest.java:6: error: unknown tag: two
           * @two}
             ^

      That, e.g., forces to use multiple code tags inside of <pre> (instead of the single common), like:

        * <pre>
        * {@code @com.example.foo(name1=val1, name2=val2)}
        * {@code @com.example.foo(val)}
        * {@code @com.example.foo}
        * </pre>

      (which is not very convenient).


      Tested with JDK9 b71

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            avstepan Alexander Stepanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: