RFR: 8257037: No javac warning when calling deprecated constructor with diamond [v2]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Mon Dec 7 10:43:14 UTC 2020


On Fri, 4 Dec 2020 19:11:01 GMT, Guoxiong Li <github.com+13688759+lgxbslgx at openjdk.org> wrote:

>>> @mcimadamore Should I add you as a contributor of this patch? Does it need another reviewer to review if I add you as a contributor?
>> 
>> As you prefer - I don't mind either way. I don't think adding me as a contributor should prevent the integration, or me being able to sponsor, but I'm not 100% sure.
>
> I revise the test code based on the comment[1] written by Jonathan Gibbons in JDK-8231622[2].
> 
>> For tests that use /ref=file -XDrawDiagnostics the conventions are:
>>
>>   1. Omit the complete legal header, including the copyright and license
>>   2. After `@test` add the text `/nodynamiccopyright/`
>>
>> #1 protects the file against any future changes in the length of the legal header, that might affect line numbers, and #2 is for use by automated scripts that may check for the presence of the legal header.
> 
> [1] https://mail.openjdk.java.net/pipermail/compiler-dev/2020-December/015542.html
> [2] https://github.com/openjdk/jdk/pull/1626

The extensive testing revealed at least 10 cases where the compiler is issuing a new, resolution-related error when it wasn't doing so before - (the errors seem to have to do with `abstract` methods). As a result I think it's best to go with your first conservative approach, to avoid troubles. I'll try to investigate further and come up with a reduced test case for the failing condition - but that doesn't have to hold up this fix. Thanks!

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

PR: https://git.openjdk.java.net/jdk/pull/1490


More information about the compiler-dev mailing list