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

org.sonar.l10n.java.rules.squid.CallToDeprecatedMethod.html Maven / Gradle / Ivy

There is a newer version: 8.9.0.37768
Show newest version

Once deprecated, classes, and interfaces, and their members should be avoided, rather than used, inherited or extended. Deprecation is a warning that the class or interface has been superseded, and will eventually be removed. The deprecation period allows you to make a smooth transition away from the aging, soon-to-be-retired technology.

Noncompliant Code Example

/**
 * @deprecated  As of release 1.3, replaced by {@link #Fee}
 */@Deprecated
class Fum { ... }

public class Bar extends Fum {  // Noncompliant; Fum is deprecated

  public void myMethod() {
    Foo foo = new Foo();  // okay; the class isn't deprecated
    foo.doTheThing();  // Noncompliant
  }
}

See





© 2015 - 2025 Weber Informatics LLC | Privacy Policy