RFR: JDK-8209022: Missing checkcast when casting to type parameter bounded by intersection type

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Sep 20 20:00:10 UTC 2018


Looks good

Maurizio


On 20/09/18 16:34, Vicente Romero wrote:
> Thanks for the review, I have updated the webrev:
>
> http://cr.openjdk.java.net/~vromero/8209022/webrev.01/jdk.dev.patch
>
> Thanks,
> Vicente
>
> On 09/20/2018 05:05 AM, Maurizio Cimadamore wrote:
>> Looks good.
>>
>> The test could be simplified either by using TestNG (which supports 
>> assertions for exceptions), or by defining an helper function which 
>> takes a Runnable. Then you can pass it two method references ::f and 
>> ::g and the helper function could call them and check for exceptions.
>>
>> Maurizio
>>
>>
>> On 20/09/18 02:10, Vicente Romero wrote:
>>> Please review fix for [1] at [2]. Javac was `forgetting` to coerce 
>>> some expressions to the target type after erasure. Implying that 
>>> there were missing checkcasts generated in the byte code.
>>>
>>> Thanks,
>>> Vicente
>>>
>>> [1] https://bugs.openjdk.java.net/browse/JDK-8209022
>>> [2]http://cr.openjdk.java.net/~vromero/8209022/webrev.00/jdk.dev.patch
>>
>



More information about the compiler-dev mailing list