Skip to content

Avoid Method Override That Only Delegates to Super ​

WarningAnti-Patterns & Bad Practices#EC NO_EMPTY_OVERRIDERemote Enabled

Overview ​

Avoid method override that only calls super.

ATC Finding Message: Empty method override; method only delegates to super

Rationale ​

Redefining a method only to immediately call the superclass method without performing any additional initialization, logging, argument transformation, or side effect is redundant. It clutters the method implementation, adds needless call stack overhead, and requires maintenance whenever super signatures change. Omit the empty override and let polymorphism delegate to the superclass naturally.

Non-Compliant ​

abap
METHOD do_work.
  super->do_work( ).
ENDMETHOD.

Compliant ​

abap
" Omit method redefinition and let superclass handle execution naturally

Configuration & Thresholds ​

This check can be fine-tuned directly in the ATC Check Variant Editor (CHKV) in Eclipse ADT:

Parameter NameData TypeDefault ValueDescription & Guidance
IGNORE_CTORBooleantrueIgnore empty constructor redefinitions (when only calling super->constructor)
IGNORE_CHECKBooleantrueIgnore empty redefinitions in test classes or abstract interfaces

Suppression ​

To suppress findings for this rule, append the pseudo-comment to the statement:

abap
" Standard pseudo-comment:
... "#EC NO_EMPTY_OVERRIDE

" SAP CI_ prefix format:
... "#EC CI_NO_EMPTY_OVERRIDE

Technical Details ​

Released under the MIT License.