-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
8257037: No javac warning when calling deprecated constructor with di…
…amond Reviewed-by: mcimadamore
- Loading branch information
1 parent
46b35ac
commit 2c04fc0
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* @test /nodynamiccopyright/ | ||
* @bug 8257307 | ||
* @summary No javac warning when calling deprecated constructor with diamond | ||
* @run compile/ref=T8257037.out -Xlint -XDrawDiagnostics T8257037.java | ||
*/ | ||
|
||
public class T8257037 { | ||
T8257037_GenericClass<Object> test = new T8257037_GenericClass<>(); // use diamond | ||
} | ||
|
||
class T8257037_GenericClass<T> { | ||
@Deprecated | ||
public T8257037_GenericClass() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
T8257037.java:9:42: compiler.warn.has.been.deprecated: <T>T8257037_GenericClass(), T8257037_GenericClass | ||
1 warning |
2c04fc0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review
Issues