So here is the perfectly logical, but unnecessarily complex piece of code...
_method cit_circuit.is_bearer? l_bearer? << _if _self.cit_circuit_type.code = "Bearer" _then >> _true _else >> _false _endif >> l_bearer?
_endmethod$
... which can be greatly simplified to...
_method cit_circuit.is_bearer?
_return _self.cit_circuit_type.code = "Bearer"
_endmethod$
Any time you see an if/then/else block of code that returns a boolean that should raise a red flag for you that your code structure is too complex.
No comments:
Post a Comment