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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8, 9
    • tools
    • None

      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

            Unassigned Unassigned
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: