On Wed, 16 Dec 2020 16:26:37 GMT, Vicente Romero <vrom...@openjdk.org> wrote:

>> The fix for JDK-8256693 too often produces a ParameterizedType as the result 
>> of getAnnotatedReceiverType().getType() . A ParameterizedType is necessary 
>> only when this type or any of its transitive owner types has type 
>> parameters, but should be avoided if this isn't the case.
>> 
>> This implementation recursively creates a chain of ParameterizedTypes 
>> starting from the outermost type that has type parameters.
>> 
>> See here for the now closed JDK 17 pr: 
>> https://github.com/openjdk/jdk/pull/1414
>
> test/jdk/java/lang/annotation/typeAnnotations/GetAnnotatedReceiverType.java 
> line 181:
> 
>> 179:         if (failures != 0)
>> 180:             throw new RuntimeException("Test failed, see log for 
>> details");
>> 181:         else if (tests != 25)
> 
> this looks a bit brittle, isn't it better to count the number of tests 
> failing and issue an error if that number is > 0?

Yes, not great, but at least it isn't brittle when running the test, only when 
changing it. I'd like to take a separate pass over the tests for 17 if possible.

-------------

PR: https://git.openjdk.java.net/jdk16/pull/33

Reply via email to