You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ Up front: I'm not sure if ABAP Cleaner SHOULD help here,
but I think it COULD, so I'm putting this up for consideration ]
If, in my code, I call a method of a locally defined object reference,
BEFORE there was ever a WRITE/INSTANTION on the object reference,
then this surely is a mistake (it will dump if executed).
Like un-used variables, ABAP Cleaner could point this out to me.
Example:
method do_something.
data: not_used type any.
data: lo_log TYPE REF TO zcl_log.
"[...some code - NOT touching lo_log]
" TODO: this is a NULL-reference!! (ABAP cleaner)
lo_log->add_message( ).
[... some more code]
CREATE OBJECT lo_log.
lo_log->add_message( )..
"[...]
endmethod.
The text was updated successfully, but these errors were encountered:
I completely agree: This is a bit more the domain of static code checks (i.e. the "check" ellipsis, not the "automate" ellipsis of ABAP Tools for Clean ABAP), but there is indeed an overlap – basically whenever ABAP cleaner generates a TODO comment – and since ABAP cleaner is probably run more frequently, why not help developers discover this immediately.
[ Up front: I'm not sure if ABAP Cleaner SHOULD help here,
but I think it COULD, so I'm putting this up for consideration ]
If, in my code, I call a method of a locally defined object reference,
BEFORE there was ever a WRITE/INSTANTION on the object reference,
then this surely is a mistake (it will dump if executed).
Like un-used variables, ABAP Cleaner could point this out to me.
Example:
The text was updated successfully, but these errors were encountered: