Back to Intellij Community

RedundantSuppression

platform/platform-resources-en/src/inspectionDescriptions/RedundantSuppression.html

2025.3-rc-2466 B
Original Source

Reports usages of the following elements that can be safely removed because the inspection they affect is no longer applicable in this context:

  • @SuppressWarning annotation, or
  • // noinspection line comment, or
  • /** noinspection */ JavaDoc comment

Example:

public class C {
 // symbol is already private,
 // but annotation is still around
  @SuppressWarnings({"WeakerAccess"})
  private boolean CONST = true;
  void f() {
    CONST = false;
  }
}