http://www.breakitdownblog.com/supported-values-for-suppresswarnings/
Update #1: All these annotations are still valid in Eclipse 3.4 and 3.5, there have been no new SuppressWarning arguments added in those versions of the JDT compiler.
If you are a Java developer and use the new @SuppressWarnings annotation in your code from time-to-time to suppress compiler warnings you, like me, have wondered probably about a million times already just exactly what are the supported values that can be used with this annotation.
The reason the list isn’t easy to find is because it’s compiler specific, which means Sun may have a different set of supported values than say IBM, GCJ or Apache Harmony.
Fortunately for us, the Eclipse folks have documented the values they support (As of Eclipse 3.3), here they are for reference:
-
all to suppress all warnings
-
boxing to suppress warnings relative to boxing/unboxing operations
-
cast to suppress warnings relative to cast operations
-
dep-ann to suppress warnings relative to deprecated annotation
-
deprecation to suppress warnings relative to deprecation
-
fallthrough to suppress warnings relative to missing breaks in switch statements
-
finally to suppress warnings relative to finally block that don’t return
-
hiding to suppress warnings relative to locals that hide variable
-
incomplete-switch to suppress warnings relative to missing entries in a switch statement (enum case)
-
nls to suppress warnings relative to non-nls string literals
-
null to suppress warnings relative to null analysis
-
restriction to suppress warnings relative to usage of discouraged or forbidden references
-
serial to suppress warnings relative to missing serialVersionUID field for a serializable class
-
static-access to suppress warnings relative to incorrect static access
-
synthetic-access to suppress warnings relative to unoptimized access from inner classes
-
unchecked to suppress warnings relative to unchecked operations
-
unqualified-field-access to suppress warnings relative to field access unqualified
-
unused to suppress warnings relative to unused code
TIP: For the folks that haven’t used @SuppressWarnings before, the syntax looks like this:
@SuppressWarnings(”unused”)
and can be placed above almost any piece of code that is causing a compiler warning to popup for your class.
分享到:
相关推荐
JAVA连接hive/hbase/sparksql/hdfs,kerbers认证失败 报no supported default etypes for default_tkt_enctypes ,需要更新jdk8的安全jar包,用来处理keytab文件,可以在oracle官网下,但是要注册账号,也可以下我的...
Supported Configurations for Oracle WebLogic Server 10.3
老师当时给我们发的,保存一下,以后观看。另外还有一个专门做词云的网页。
ERROR:ABIs [armeabi] are not supported for platform.Supported ABIs are [arm64-v8a, armeabi-v7的完美解决方案-附件资源
词云生成器是一种数据可视化工具,它以图形的方式展示文本数据,通过将高频词汇以不同大小的字体在图像中呈现,使人们能快速理解和感知文本的主要内容。在本案例中,我们关注的是一个基于Python实现的免安装词云生成...
At present, cable supported bridges are enabled for spans in the range from 200 m to 2000 m (and beyond), thus covering approximately 90 per cent of the present span range. For the vast majority of ...
项目中碰到的问题
解决SVN上传提示Empty directoriesis not supported 解决SVN上传提示Empty directoriesis not supported
网上各种教程无法解决这个工具提示 not supported not listening问题,这个安装包给出了所有需要的文件,并给出了详细的指引。 绝大多数情况你会安装成功。如果你成功了,或者失败了,请给我评论。大家看评论区。
铁(III)金属-有机凝胶作为负载催化剂催化环氧化物醇解反应,杨秋丽,相升林,将1,3,5-苯三甲酸和铁盐在不同的醇溶剂中简单地混合得到了一系列金属-有机凝胶。通过SEM和TEM表征了凝胶的海绵状多孔网络结构。...
ThinkPHP6.1 Filesystem Driver aliyun not supported
Jun 08 00:02:46 localhost.localdomain firewalld[854]: WARNING: ICMP type 'beyond-scope' is not supported by the kernel for ipv6. Jun 08 00:02:46 localhost.localdomain firewalld[854]: WARNING: beyond-...
Git 2.9.2 for windows 64 更新
Warning: the AUFS storage driver is deprecated in boot2docker and AUFS support is removed in 18.09+. You can continue with AUFS in boot2docker 18.06.x, but it is ... See #1326 for more discussion.
Sharing is only supported for boot loader classes because bootstrap classpath has been appended 出现这个的原因是因为使用了共享类数据,你可能t同时使用了 -Xbootclasspath/a 和 CDS (或者 AppCDS) 这个...
Unfortunately, my Android phone (Samsung GS8 ) was not on the supported list, and apps built with ARCore exit at start on my device. However, its hardware actually can run ARCore! I modified the ...
for (FileHeader fileHeader : archive.getFileHeaders()) { if (!fileHeader.isDirectory()) { File destFile = new File(fileHeader.getLocalFileNameString()); FileOutputStream fos = new FileOutputStream...
Bug with getting default values for fields with aliases is fixed Bug in TMyDump with dump BIGINT UNSIGNED fields is fixed Bug with resolving hostname on iOS device is fixed Bug with compatibility ...
Our dOPC Client Toolkit for Delphi is probably one of the most used OPC component collections for Delphi worldwide. In addition, there are a number of good reasons why you should purchase our OPC ...