Details
-
Bug
-
Resolution: Fixed
-
P2
-
8
-
b112
-
Verified
Description
JCK tests will fail due to this issue: j.l.r.Parameter.getAnnotatedType().getType() for not annotated use of type returns null.
From the API doc for j.l.r.Parameter.getAnnotatedType(): "Returns an AnnotatedType object that represents the use of a type to specify the type of the formal parameter represented by this Parameter."
Tested with jdk8b100.
Minimized test:
----------------------------------------
public class Test {
public void meth(Object param) {}
public static void main(String[] args) throws NoSuchMethodException {
System.out.println(Data.class.getMethod("meth", Object.class).getParameters()[0].getAnnotatedType().getType());
}
}
----------------------------------------
Output:
----------------------------------------
null
----------------------------------------
From the API doc for j.l.r.Parameter.getAnnotatedType(): "Returns an AnnotatedType object that represents the use of a type to specify the type of the formal parameter represented by this Parameter."
Tested with jdk8b100.
Minimized test:
----------------------------------------
public class Test {
public void meth(Object param) {}
public static void main(String[] args) throws NoSuchMethodException {
System.out.println(Data.class.getMethod("meth", Object.class).getParameters()[0].getAnnotatedType().getType());
}
}
----------------------------------------
Output:
----------------------------------------
null
----------------------------------------