Integrated: 8257037: No javac warning when calling deprecated constructor with diamond
Guoxiong Li
github.com+13688759+lgxbslgx at openjdk.java.net
Mon Dec 7 13:54:14 UTC 2020
On Sat, 28 Nov 2020 09:46:06 GMT, Guoxiong Li <github.com+13688759+lgxbslgx at openjdk.org> wrote:
> Hi all,
>
> When calling deprecated constructor with diamond, the compiler doesn't output warning.
> The test case is shown below.
>
> GenericClass<Object> o2 = new GenericClass<>();
>
> public class GenericClass<T> {
> @Deprecated
> public GenericClass() {}
> }
>
> This patch solves the bug and adds corresponding test case.
> Thank you for taking the time to review.
>
> Best Regards.
This pull request has now been integrated.
Changeset: 2c04fc02
Author: Guoxiong Li <lgxbslgx at gmail.com>
Committer: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/2c04fc02
Stats: 41 lines in 3 files changed: 40 ins; 0 del; 1 mod
8257037: No javac warning when calling deprecated constructor with diamond
Reviewed-by: mcimadamore
-------------
PR: https://git.openjdk.java.net/jdk/pull/1490
More information about the compiler-dev
mailing list