gpt4 book ai didi

java - Java 中有效的@SuppressWarnings 警告名称列表是什么?

转载 作者:bug小助手 更新时间:2023-10-28 10:40:11 25 4
gpt4 key购买 nike

Java 中有效的 @SuppressWarnings 警告名称列表是什么?

@SuppressWarnings("")("") 之间的位。

最佳答案

这取决于您的 IDE 或编译器。

这里是 list对于 Eclipse 伽利略:

  • 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

List对于 Indigo 补充:

  • javadoc to suppress warnings relative to javadoc warnings
  • rawtypes to suppress warnings relative to usage of raw types
  • static-method to suppress warnings relative to methods that could be declared as static
  • super to suppress warnings relative to overriding a method without super invocations

List朱诺补充道:

  • resource to suppress warnings relative to usage of resources of type Closeable
  • sync-override to suppress warnings because of missing synchronize when overriding a synchronized method

Kepler 和 Luna 使用与 Juno 相同的 token 列表 (list)。

其他的将相似但有所不同。

关于java - Java 中有效的@SuppressWarnings 警告名称列表是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1205995/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com