All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.squidjava.rules.squid.MissingDeprecatedCheck.html Maven / Gradle / Ivy

Deprecation should be made using both the @Deprecated Java language annotation and @deprecated Javadoc tag. The annotation enables tools such as IDEs to warn about referencing deprecated elements, and the tag can be used to explain when it was deprecated, why, and how references should be refactored.

The following code illustrates this rule:

class MyClass {

  @Deprecated             // Non-Compliant
  public void foo1() {
  }

  /**
    * @deprecated
    */
  public void foo2() {    // Non-Compliant
  }

  /**
    * @deprecated
    */
  @Deprecated
  public void foo3() {    // Compliant
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy