[英]IntelliJ Suppress Deprecated Warning For Certain Method?
is there any option to suppress deprecated warnings only for certain methods?是否有任何选项可以仅针对某些方法抑制已弃用的警告?
Thanks谢谢
Put this annotation on your method:将此注释放在您的方法上:
@SuppressWarnings( "deprecation" )
To suppress all warnings you can do要抑制所有警告,您可以执行
@SuppressWarnings("all")
but this is not suggested because these warning alaways exist for a reason...但不建议这样做,因为这些警告总是存在是有原因的......
You can annotate the methods with the @SuppressWarnings("deprecated")
annotation.您可以使用
@SuppressWarnings("deprecated")
注释来注释方法。 read more about that here: https://docs.oracle.com/javase/7/docs/api/java/lang/SuppressWarnings.html在此处阅读更多相关信息: https : //docs.oracle.com/javase/7/docs/api/java/lang/SuppressWarnings.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.