Details

    • Type: Language-Specification
    • Status: Active
    • Resolution: Unresolved
    • Labels:
      None
    • Impact:
      Unknown 'null' severity
    • Likelihood:
      Unknown 'null' severity

      Description

      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
      }
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ann.campbell.2 Ann Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: