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

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

There is a newer version: 2.14.0.5032
Show newest version

Why is this an issue?

Overriding a method just to call the same method from the super class without performing any other actions is useless and misleading.

Noncompliant code example

override public function doSomething() : void
{
  super.doSomething();
}

override public function isLegal(action:Action) : Boolean
{
  return super.isLegal(action);
}

Compliant solution

override public function doSomething() : void
{
  super.doSomething();                             // Compliant - not simply forwarding the call
  doSomethingElse();
}

override public function isLegal(action:Action) : Boolean
{
  return super.isLegal(new Action(...));   // Compliant - not simply forwarding the call
}

[Deprecated(replacement="isAuthorized")]
override public function isLegal(action:Action) : Boolean
{
  return super.isLegal(action);   // Compliant as there is a metadata
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy