test/java/lang/annotation/typeAnnotations/TestExecutableGetAnnotatedType.java

Print this page
rev 10097 : 8044629: (reflect) Constructor.getAnnotatedReceiverType() returns wrong value
Reviewed-by: duke


  56     @Test(dataProvider = "genericExecutableData")
  57     public void testGenericMethodParameterTypes(Executable e) throws Exception {
  58         testMethodParameters(e);
  59     }
  60 
  61     @Test(dataProvider = "executableData")
  62     public void testMethodParameterTypes(Executable e) throws Exception {
  63         testMethodParameters(e);
  64     }
  65 
  66     @Test(dataProvider = "genericExecutableData")
  67     public void testGenericParameterTypes(Executable e) throws Exception {
  68         testParameters(e.getParameters());
  69     }
  70 
  71     @Test(dataProvider = "executableData")
  72     public void testParameterTypes(Executable e) throws Exception {
  73         testParameters(e.getParameters());
  74     }
  75 
  76     // should test constructors as well, see JDK-8044629
  77     @Test(dataProvider = "genericMethodData")
  78     public void testGenericReceiverType(Executable e) throws Exception {
  79         testReceiverType0(e);
  80     }
  81 
  82     // should test constructors as well, see JDK-8044629
  83     @Test(dataProvider = "methodData")
  84     public void testReceiverType(Executable e) throws Exception {
  85         testReceiverType0(e);
  86     }
  87 
  88     @Test(dataProvider = "genericMethodData")
  89     public void testGenericMethodReturnType(Object o) throws Exception {
  90         // testng gets confused if the param to this method has type Method
  91         Method m = (Method)o;
  92         testReturnType(m);
  93     }
  94 
  95     @Test(dataProvider = "methodData")
  96     public void testMethodReturnType(Object o) throws Exception {
  97         // testng gets confused if the param to this method has type Method
  98         Method m = (Method)o;
  99         testReturnType(m);
 100     }
 101 
 102     private void testExceptions(Executable e) {




  56     @Test(dataProvider = "genericExecutableData")
  57     public void testGenericMethodParameterTypes(Executable e) throws Exception {
  58         testMethodParameters(e);
  59     }
  60 
  61     @Test(dataProvider = "executableData")
  62     public void testMethodParameterTypes(Executable e) throws Exception {
  63         testMethodParameters(e);
  64     }
  65 
  66     @Test(dataProvider = "genericExecutableData")
  67     public void testGenericParameterTypes(Executable e) throws Exception {
  68         testParameters(e.getParameters());
  69     }
  70 
  71     @Test(dataProvider = "executableData")
  72     public void testParameterTypes(Executable e) throws Exception {
  73         testParameters(e.getParameters());
  74     }
  75 

  76     @Test(dataProvider = "genericMethodData")
  77     public void testGenericReceiverType(Executable e) throws Exception {
  78         testReceiverType0(e);
  79     }
  80 

  81     @Test(dataProvider = "methodData")
  82     public void testReceiverType(Executable e) throws Exception {
  83         testReceiverType0(e);
  84     }
  85 
  86     @Test(dataProvider = "genericMethodData")
  87     public void testGenericMethodReturnType(Object o) throws Exception {
  88         // testng gets confused if the param to this method has type Method
  89         Method m = (Method)o;
  90         testReturnType(m);
  91     }
  92 
  93     @Test(dataProvider = "methodData")
  94     public void testMethodReturnType(Object o) throws Exception {
  95         // testng gets confused if the param to this method has type Method
  96         Method m = (Method)o;
  97         testReturnType(m);
  98     }
  99 
 100     private void testExceptions(Executable e) {