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

Only one of several deprecated overloaded methods listed in the Deprecated list

    XMLWordPrintable

Details

    • b01
    • 11
    • b29
    • Not verified

    Backports

      Description

        A DESCRIPTION OF THE PROBLEM :
        If a class has two or more overloaded methods (or constructors) that are deprecated only one of these will be included in the lists of deprecated methods and constructors.

        The class documentation this marks all the methods as deprecated.

        This is a change in behavior between Java 8 and Java 11.

        REGRESSION : Last worked in version 8u251

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        1) Create a class with two or more overloaded methods
        2) Deprecate the methods
        3) Generate Javadoc (and make sure to keep the Deprecated list option enabled)



        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        That the Deprecated page lists all the deprecated methods.
        ACTUAL -
        Only one of the overloaded methods is listed on the Deprecated page.

        ---------- BEGIN SOURCE ----------
        package com.example;

        public class Foo {

          /**
           * Creates a new instance.
           */
          public Foo() {

          }

          /**
           * Creates a new instance.
           *
           * @param string a string
           * @deprecated Do not use
           */
          @Deprecated
          public Foo(String string) {

          }

          /**
           * Creates a new instance.
           *
           * @param integer an integer
           * @deprecated Do not use
           */
          @Deprecated
          public Foo(int integer) {

          }

          /**
           * Does something.
           */
          public void overloadedMethod() {

          }

          /**
           * Does something.
           *
           * @param string a string
           * @deprecated Do not use
           */
          @Deprecated
          public void overloadedMethod(String string) {

          }

          /**
           * Does something.
           *
           * @param integer an integer
           * @deprecated Do not use
           */
          @Deprecated
          public void overloadedMethod(int integer) {

          }
        }

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

        FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

                hannesw Hannes Wallnoefer
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: