-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b172
-
b25
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8226054 | 14 | Joe Darcy | P4 | Resolved | Fixed | team |
The getAnnotatedParameterTypes() specification incorrectly defines its behavior in case of no-args constructor for inner classes.
The specification states: "Returns an array of length 0 if the method/constructor declares no parameters."
Actual behavior is :
--------------------------------------------------
class ConsParamData {
public class Inner {
public Inner(@Anno(0) ConsParamData ConsParamData.this) {}
public class InnerInner {
public InnerInner() {}
}
}
}
params={ConsParamData} ConsParamData.Inner.class.getConstructor(params).getAnnotatedParameterTypes()
[ ctor == public Inner(@Anno(0) ConsParamData ConsParamData.this) {} ]
returns { ConsParamData }.length() == 1
params={ ConsParamData.Inner} ConsParamData.Inner.InnerInner.class.getConstructor(params).getAnnotatedParameterTypes()
[ ctor == public InnerInner() {} ]
returns { ConsParamData$Inner }.length() == 1
--------------------------------
The specification states: "Returns an array of length 0 if the method/constructor declares no parameters."
Actual behavior is :
--------------------------------------------------
class ConsParamData {
public class Inner {
public Inner(@Anno(0) ConsParamData ConsParamData.this) {}
public class InnerInner {
public InnerInner() {}
}
}
}
params={ConsParamData} ConsParamData.Inner.class.getConstructor(params).getAnnotatedParameterTypes()
[ ctor == public Inner(@Anno(0) ConsParamData ConsParamData.this) {} ]
returns { ConsParamData }.length() == 1
params={ ConsParamData.Inner} ConsParamData.Inner.InnerInner.class.getConstructor(params).getAnnotatedParameterTypes()
[ ctor == public InnerInner() {} ]
returns { ConsParamData$Inner }.length() == 1
--------------------------------
- backported by
-
JDK-8226054 getAnnotatedParameterTypes() specification should be clarified
- Resolved
- relates to
-
JDK-8074977 Constructor.getAnnotatedParameterTypes returns wrong value
- Closed