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

javadoc does not report warnings in case of multiple "@param" tags for the same parameter and multiple "@return" tags for the same method.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • tools
    • b155
    • Verified

        public class JavadocTest {

            /**
             * Test.
             *
             * @param s one
             * @param s two
             * @param s three
             *
             *
             * @return result-one
             * @return result-two
             * @return result-three
             */
            public static int Test(String s) { return s.length(); }

            /**
             * Main.
             *
             * @param args param-one
             * @param args param-two
             * @param args param-three
             */
            public static void main(String[] args) {

                System.out.println(Test("test"));
            }
        }


        Output (html):

        public static int Test(java.lang.String s)

        Test.

        Parameters:
            s - one
            s - two
            s - three
        Returns:
            result-one

        public static void main(java.lang.String[] args)

        Main.

        Parameters:
            args - param-one
            args - param-two
            args - param-three


        No warnings/errors were reported while running javadoc - is that behavior expected?

        JDK9 b66 was used.

              jjg Jonathan Gibbons
              avstepan Alexander Stepanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: