-
Bug
-
Resolution: Fixed
-
P3
-
11, 14, 15
-
b01
-
b29
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8248031 | 16 | Hannes Wallnoefer | P3 | Resolved | Fixed | b03 |
JDK-8250077 | 15.0.2 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8250375 | 15.0.1 | Hannes Wallnoefer | P3 | Resolved | Fixed | b03 |
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
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
- backported by
-
JDK-8248031 Only one of several deprecated overloaded methods listed in the Deprecated list
- Resolved
-
JDK-8250077 Only one of several deprecated overloaded methods listed in the Deprecated list
- Resolved
-
JDK-8250375 Only one of several deprecated overloaded methods listed in the Deprecated list
- Resolved