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

org.sonar.l10n.flex.rules.flex.S1068.html Maven / Gradle / Ivy

If a private field is declared but not used in the program, it can be considered dead code and should therefore be removed. This will improve maintainability because developers will not wonder what the variable is used for.

Noncompliant Code Example

 public class MyClass {
  private var foo:int = 4;                       //foo is unused

  public function compute(a:int):int{
    return a * 4;
  }
}

Compliant Solution

public class MyClass {

  public function compute(a:int):int{
    return a * 4;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy