如何具体抑制“比较相同的表达”在Eclipse-Helios JDT中 [英] How to specifically suppress "Comparing identical expressions" in Eclipse-Helios JDT
问题描述
我尝试使用
@SuppressWarnings("compareIdentical")
但这不起作用(更糟糕的是,注释结果自己的不支持@SuppressWarnings(compareIdentical)
警告!)
but this does not work (worse yet, the annotation results in its own Unsupported @SuppressWarnings("compareIdentical")
warning!)
我知道我可以随时使用
@SuppressWarnings("all")
但是会更多的警告抑制比我想要的。
but that'd be more warning-suppression than I want.
FWIW,我从 http://help.eclipse.org/helios/index.jsp?topic= /org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm (一个冰雹通行证,确定)。
FWIW, I got the "compareIdentical" string from the "Warning Options" table in http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm (a hail-mary pass, to be sure).
谢谢! / p>
Thanks!
推荐答案
可以在 SuppressWarning
注释中使用的令牌列表on是:
The list of tokens that can be used inside an SuppressWarning
annotation is:
-
all
可以抑制所有警告 -
拳击
以禁止相对于拳击/拆箱操作的警告 -
cast
禁止相对于演员操作的警告 -
dep-ann
可以抑制相对于弃用注释的警告 -
deprecation
以禁止相对于弃用的警告 -
fallthrough
to禁止相对于switch语句中缺少中断的警告 -
finally
可以抑制相对于不返回的finally块的警告 -
隐藏
以遏制相对于隐藏变量的本地人的警告 -
不完全开关
可以禁止相对于switch语句(枚举大小写)中缺少的条目的警告。 -
nls
以抑制警告相对于非nls字符串文字 -
null
以抑制警告r -
raw
可以抑制相对于使用原始类型的警告 -
限制
以禁止使用不鼓励或禁止的引用的警告 -
serial
to禁止相对于可序列化类的缺少serialVersionUID字段的警告 -
static-access
可抑制相对于不正确的静态访问的警告 -
超级
可以抑制相对于超越无法超调的方法的警告 -
-access
来抑制相对于内部类的未优化访问的警告 -
未选中
以禁止相对于未选中的警告 -
不合格的现场访问
以禁止相对于现场访问的警告不合格 -
unused
来抑制相对于未使用的代码和死码的警告
all
to suppress all warningsboxing
to suppress warnings relative to boxing/unboxing operationscast
to suppress warnings relative to cast operationsdep-ann
to suppress warnings relative to deprecated annotationdeprecation
to suppress warnings relative to deprecationfallthrough
to suppress warnings relative to missing breaks in switch statementsfinally
to suppress warnings relative to finally block that don't returnhiding
to suppress warnings relative to locals that hide variableincomplete-switch
to suppress warnings relative to missing entries in a switch statement (enum case)nls
to suppress warnings relative to non-nls string literalsnull
to suppress warnings relative to null analysisraw
to suppress warnings relative to usage of raw typesrestriction
to suppress warnings relative to usage of discouraged or forbidden referencesserial
to suppress warnings relative to missing serialVersionUID field for a serializable classstatic-access
to suppress warnings relative to incorrect static accesssuper
to suppress warnings relative to overriding a method without super invocationssynthetic-access
to suppress warnings relative to unoptimized access from inner classesunchecked
to suppress warnings relative to unchecked operationsunqualified-field-access
to suppress warnings relative to field access unqualifiedunused
to suppress warnings relative to unused code and dead code
没有什么可以帮助你。
这篇关于如何具体抑制“比较相同的表达”在Eclipse-Helios JDT中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!