RFR: 8257037: No javac warning when calling deprecated constructor with diamond
Guoxiong Li
github.com+13688759+lgxbslgx at openjdk.java.net
Sat Nov 28 09:51:08 UTC 2020
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.
-------------
Commit messages:
- 8257037: No javac warning when calling deprecated constructor with diamond
Changes: https://git.openjdk.java.net/jdk/pull/1490/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1490&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8257037
Stats: 77 lines in 3 files changed: 67 ins; 0 del; 10 mod
Patch: https://git.openjdk.java.net/jdk/pull/1490.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1490/head:pull/1490
PR: https://git.openjdk.java.net/jdk/pull/1490
More information about the compiler-dev
mailing list