kjo*_*kjo 15 java eclipse warnings suppress-warnings eclipse-jdt
我尝试用括号注释封闭方法
@SuppressWarnings("compareIdentical")
Run Code Online (Sandbox Code Playgroud)
但这不起作用(更糟糕的是,注释会产生自己的Unsupported @SuppressWarnings("compareIdentical")警告!)
我知道我可以随时使用
@SuppressWarnings("all")
Run Code Online (Sandbox Code Playgroud)
但这比我想要的更多警告抑制.
FWIW,我从http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile中的"警告选项"表中获得了"compareIdentical"字符串. htm(冰雹通过,当然).
谢谢!
Mar*_*aux 14
可以在SuppressWarning注释中使用的标记列表是:
all 压制所有警告boxing 禁止相对于装箱/拆箱操作的警告cast 禁止相对于强制转换操作的警告dep-ann 禁止相对于已弃用的注释的警告deprecation 禁止相对于弃用的警告fallthrough 禁止相对于switch语句中丢失的中断的警告finally 抑制相对于不返回的finally块的警告hiding 禁止相对于隐藏变量的本地人的警告incomplete-switch 禁止相对于switch语句中缺少条目的警告(枚举案例)nls 禁止相对于非nls字符串文字的警告null 禁止相对于空分析的警告raw 禁止相对于原始类型的使用的警告restriction 禁止使用劝阻或禁止引用的警告serial 禁止相对于可序列化类缺少serialVersionUID字段的警告static-access 禁止相对于不正确的静态访问的警告super 禁止相对于覆盖没有超级调用的方法的警告synthetic-access 禁止相对于内部类的未优化访问的警告unchecked 禁止相对于未经检查的操作的警告unqualified-field-access 禁止相对于字段访问不合格的警告unused 禁止相对于未使用的代码和死代码的警告所以,没有什么可以帮助你.
| 归档时间: |
|
| 查看次数: |
4015 次 |
| 最近记录: |