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

Guoxiong Li github.com+13688759+lgxbslgx at openjdk.java.net
Fri Dec 4 19:10:26 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.

Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:

  Revise test. Remove legal header and add /nodynamiccopyright/.

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1490/files
  - new: https://git.openjdk.java.net/jdk/pull/1490/files/66671b02..1d06ad1c

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1490&range=03
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1490&range=02-03

  Stats: 25 lines in 2 files changed: 0 ins; 23 del; 2 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