From f6e8332754e32375a02429cd2cb54ca9969ec3de Mon Sep 17 00:00:00 2001 From: Lars Hvam Date: Tue, 25 Jun 2019 03:02:51 -0700 Subject: [PATCH] Cleanup (#2753) * refactor IF * fix some indentation * indentation fixes * indentation fixes * indentation * indentation --- ...l_abapgit_syntax_xml.clas.testclasses.abap | 2 +- src/ui/core/zcl_abapgit_gui.clas.abap | 3 +- src/ui/core/zcl_abapgit_html.clas.abap | 266 +++++++++--------- src/ui/zcl_abapgit_gui_view_repo.clas.abap | 5 +- src/utils/zcl_abapgit_convert.clas.abap | 18 +- src/utils/zcl_abapgit_log.clas.abap | 6 +- src/utils/zcl_abapgit_progress.clas.abap | 5 +- .../zcl_abapgit_requirement_helper.clas.abap | 8 +- src/zcl_abapgit_merge.clas.abap | 6 +- src/zcl_abapgit_repo_content_list.clas.abap | 4 +- src/zcl_abapgit_settings.clas.abap | 4 +- src/zcl_abapgit_skip_objects.clas.abap | 3 +- src/zcl_abapgit_stage_logic.clas.abap | 4 +- ...bapgit_transport_mass.clas.locals_imp.abap | 6 +- src/zcl_abapgit_transport_objects.clas.abap | 8 +- ...it_transport_objects.clas.testclasses.abap | 26 +- 16 files changed, 188 insertions(+), 186 deletions(-) diff --git a/src/syntax/zcl_abapgit_syntax_xml.clas.testclasses.abap b/src/syntax/zcl_abapgit_syntax_xml.clas.testclasses.abap index 4eb7fab8e..f8d83cece 100644 --- a/src/syntax/zcl_abapgit_syntax_xml.clas.testclasses.abap +++ b/src/syntax/zcl_abapgit_syntax_xml.clas.testclasses.abap @@ -4,7 +4,7 @@ CLASS ltcl_abapgit_syntax_xml DEFINITION FINAL FOR TESTING PRIVATE SECTION. DATA: - mo_cut TYPE REF TO zcl_abapgit_syntax_xml. + mo_cut TYPE REF TO zcl_abapgit_syntax_xml. METHODS: setup, diff --git a/src/ui/core/zcl_abapgit_gui.clas.abap b/src/ui/core/zcl_abapgit_gui.clas.abap index 65a2d9f24..b97d51c02 100644 --- a/src/ui/core/zcl_abapgit_gui.clas.abap +++ b/src/ui/core/zcl_abapgit_gui.clas.abap @@ -300,7 +300,8 @@ CLASS zcl_abapgit_gui IMPLEMENTATION. TRY. " Home must be processed by router if it presents IF ( iv_action <> c_action-go_home OR mi_router IS NOT BOUND ) - AND mi_cur_page IS BOUND AND zcl_abapgit_gui_utils=>is_event_handler( mi_cur_page ) = abap_true. + AND mi_cur_page IS BOUND + AND zcl_abapgit_gui_utils=>is_event_handler( mi_cur_page ) = abap_true. li_page_eh ?= mi_cur_page. li_page_eh->on_event( EXPORTING diff --git a/src/ui/core/zcl_abapgit_html.clas.abap b/src/ui/core/zcl_abapgit_html.clas.abap index 9f468150d..8c43bed4e 100644 --- a/src/ui/core/zcl_abapgit_html.clas.abap +++ b/src/ui/core/zcl_abapgit_html.clas.abap @@ -74,130 +74,6 @@ ENDCLASS. CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION. - METHOD add_icon. - - add( icon( iv_name = iv_name - iv_class = iv_class - iv_hint = iv_hint ) ). - - ENDMETHOD. - - - METHOD class_constructor. - CREATE OBJECT go_single_tags_re - EXPORTING - pattern = '<(AREA|BASE|BR|COL|COMMAND|EMBED|HR|IMG|INPUT|LINK|META|PARAM|SOURCE|!)' - ignore_case = abap_false. - ENDMETHOD. - - - METHOD indent_line. - - DATA: ls_study TYPE ty_study_result, - lv_x_str TYPE string. - - ls_study = study_line( - is_context = cs_context - iv_line = cv_line ). - - " First closing tag - shift back exceptionally - IF ( ls_study-script_close = abap_true - OR ls_study-style_close = abap_true - OR ls_study-curly_close = abap_true - OR ls_study-tag_close = abap_true ) - AND cs_context-indent > 0. - lv_x_str = repeat( val = ` ` occ = ( cs_context-indent - 1 ) * c_indent_size ). - cv_line = lv_x_str && cv_line. - ELSE. - cv_line = cs_context-indent_str && cv_line. - ENDIF. - - " Context status update - CASE abap_true. - WHEN ls_study-script_open. - cs_context-within_js = abap_true. - cs_context-within_style = abap_false. - WHEN ls_study-style_open. - cs_context-within_js = abap_false. - cs_context-within_style = abap_true. - WHEN ls_study-script_close OR ls_study-style_close. - cs_context-within_js = abap_false. - cs_context-within_style = abap_false. - ls_study-closings = ls_study-closings + 1. - ENDCASE. - - " More-less logic chosen due to possible double tags in a line '' - IF ls_study-openings <> ls_study-closings. - IF ls_study-openings > ls_study-closings. - cs_context-indent = cs_context-indent + 1. - ELSEIF cs_context-indent > 0. " AND ls_study-openings < ls_study-closings - cs_context-indent = cs_context-indent - 1. - ENDIF. - cs_context-indent_str = repeat( val = ` ` occ = cs_context-indent * c_indent_size ). - ENDIF. - - ENDMETHOD. - - - METHOD study_line. - - DATA: lv_line TYPE string, - lv_len TYPE i. - - lv_line = to_upper( shift_left( val = iv_line sub = ` ` ) ). - lv_len = strlen( lv_line ). - - " Some assumptions for simplification and speed - " - style & scripts tag should be opened/closed in a separate line - " - style & scripts opening and closing in one line is possible but only once - - " TODO & Issues - " - What if the string IS a well formed html already not just single line ? - - IF is_context-within_js = abap_true OR is_context-within_style = abap_true. - - IF is_context-within_js = abap_true AND lv_len >= 8 AND lv_line(8) = '= 7 AND lv_line(7) = '= 1 AND lv_line(1) = '}'. - rs_result-curly_close = abap_true. - ENDIF. - - FIND ALL OCCURRENCES OF '{' IN lv_line MATCH COUNT rs_result-openings. - FIND ALL OCCURRENCES OF '}' IN lv_line MATCH COUNT rs_result-closings. - ENDIF. - - ELSE. - IF lv_len >= 7 AND lv_line(7) = ' 0. " Not found - rs_result-script_open = abap_true. - ENDIF. - ENDIF. - IF lv_len >= 6 AND lv_line(6) = ' 0. " Not found - rs_result-style_open = abap_true. - ENDIF. - ENDIF. - IF lv_len >= 2 AND lv_line(2) = '| + && |{ co_span_link_hint }|. + + ENDMETHOD. + + + METHOD class_constructor. + CREATE OBJECT go_single_tags_re + EXPORTING + pattern = '<(AREA|BASE|BR|COL|COMMAND|EMBED|HR|IMG|INPUT|LINK|META|PARAM|SOURCE|!)' + ignore_case = abap_false. + ENDMETHOD. + + METHOD icon. DATA: lv_hint TYPE string, @@ -324,6 +225,54 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION. ENDMETHOD. + METHOD indent_line. + + DATA: ls_study TYPE ty_study_result, + lv_x_str TYPE string. + + ls_study = study_line( + is_context = cs_context + iv_line = cv_line ). + + " First closing tag - shift back exceptionally + IF ( ls_study-script_close = abap_true + OR ls_study-style_close = abap_true + OR ls_study-curly_close = abap_true + OR ls_study-tag_close = abap_true ) + AND cs_context-indent > 0. + lv_x_str = repeat( val = ` ` occ = ( cs_context-indent - 1 ) * c_indent_size ). + cv_line = lv_x_str && cv_line. + ELSE. + cv_line = cs_context-indent_str && cv_line. + ENDIF. + + " Context status update + CASE abap_true. + WHEN ls_study-script_open. + cs_context-within_js = abap_true. + cs_context-within_style = abap_false. + WHEN ls_study-style_open. + cs_context-within_js = abap_false. + cs_context-within_style = abap_true. + WHEN ls_study-script_close OR ls_study-style_close. + cs_context-within_js = abap_false. + cs_context-within_style = abap_false. + ls_study-closings = ls_study-closings + 1. + ENDCASE. + + " More-less logic chosen due to possible double tags in a line '' + IF ls_study-openings <> ls_study-closings. + IF ls_study-openings > ls_study-closings. + cs_context-indent = cs_context-indent + 1. + ELSEIF cs_context-indent > 0. " AND ls_study-openings < ls_study-closings + cs_context-indent = cs_context-indent - 1. + ENDIF. + cs_context-indent_str = repeat( val = ` ` occ = cs_context-indent * c_indent_size ). + ENDIF. + + ENDMETHOD. + + METHOD is_empty. rv_yes = boolc( lines( mt_buffer ) = 0 ). ENDMETHOD. @@ -348,18 +297,69 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION. ENDMETHOD. + + METHOD study_line. + + DATA: lv_line TYPE string, + lv_len TYPE i. + + lv_line = to_upper( shift_left( val = iv_line sub = ` ` ) ). + lv_len = strlen( lv_line ). + + " Some assumptions for simplification and speed + " - style & scripts tag should be opened/closed in a separate line + " - style & scripts opening and closing in one line is possible but only once + + " TODO & Issues + " - What if the string IS a well formed html already not just single line ? + + IF is_context-within_js = abap_true OR is_context-within_style = abap_true. + + IF is_context-within_js = abap_true AND lv_len >= 8 AND lv_line(8) = '= 7 AND lv_line(7) = '= 1 AND lv_line(1) = '}'. + rs_result-curly_close = abap_true. + ENDIF. + + FIND ALL OCCURRENCES OF '{' IN lv_line MATCH COUNT rs_result-openings. + FIND ALL OCCURRENCES OF '}' IN lv_line MATCH COUNT rs_result-closings. + ENDIF. + + ELSE. + IF lv_len >= 7 AND lv_line(7) = ' 0. " Not found + rs_result-script_open = abap_true. + ENDIF. + ENDIF. + IF lv_len >= 6 AND lv_line(6) = ' 0. " Not found + rs_result-style_open = abap_true. + ENDIF. + ENDIF. + IF lv_len >= 2 AND lv_line(2) = '| - && |{ co_span_link_hint }|. - - ENDMETHOD. - ENDCLASS. diff --git a/src/ui/zcl_abapgit_gui_view_repo.clas.abap b/src/ui/zcl_abapgit_gui_view_repo.clas.abap index 93c29b194..0d50f3b1b 100644 --- a/src/ui/zcl_abapgit_gui_view_repo.clas.abap +++ b/src/ui/zcl_abapgit_gui_view_repo.clas.abap @@ -746,8 +746,9 @@ CLASS ZCL_ABAPGIT_GUI_VIEW_REPO IMPLEMENTATION. ro_html->add( '
' ). " Offline match banner - IF mo_repo->is_offline( ) = abap_true AND mo_repo->has_remote_source( ) = abap_true - AND lv_lstate IS INITIAL AND lv_rstate IS INITIAL. + IF mo_repo->is_offline( ) = abap_true + AND mo_repo->has_remote_source( ) = abap_true + AND lv_lstate IS INITIAL AND lv_rstate IS INITIAL. ro_html->add( |
| && |ZIP source is attached and completely matches to the local state| diff --git a/src/utils/zcl_abapgit_convert.clas.abap b/src/utils/zcl_abapgit_convert.clas.abap index 80f8cef55..44707e71f 100644 --- a/src/utils/zcl_abapgit_convert.clas.abap +++ b/src/utils/zcl_abapgit_convert.clas.abap @@ -149,10 +149,8 @@ CLASS ZCL_ABAPGIT_CONVERT IMPLEMENTATION. IF lv_bitbyte+lv_offset(1) = '1'. rv_int = 1. ENDIF. - ELSE. - IF lv_bitbyte+lv_offset(1) = '1'. - rv_int = rv_int + ( 2 ** ( sy-index - 1 ) ). - ENDIF. + ELSEIF lv_bitbyte+lv_offset(1) = '1'. + rv_int = rv_int + ( 2 ** ( sy-index - 1 ) ). ENDIF. lv_offset = lv_offset - 1. "Move Cursor @@ -236,12 +234,12 @@ CLASS ZCL_ABAPGIT_CONVERT IMPLEMENTATION. METHOD xstring_to_bintab. CALL FUNCTION 'SCMS_XSTRING_TO_BINARY' - EXPORTING - buffer = iv_xstr - IMPORTING - output_length = ev_size - TABLES - binary_tab = et_bintab. + EXPORTING + buffer = iv_xstr + IMPORTING + output_length = ev_size + TABLES + binary_tab = et_bintab. ENDMETHOD. diff --git a/src/utils/zcl_abapgit_log.clas.abap b/src/utils/zcl_abapgit_log.clas.abap index 9411950c0..4e44b6b67 100644 --- a/src/utils/zcl_abapgit_log.clas.abap +++ b/src/utils/zcl_abapgit_log.clas.abap @@ -78,9 +78,9 @@ CLASS ZCL_ABAPGIT_LOG IMPLEMENTATION. METHOD zif_abapgit_log~add_error. zif_abapgit_log~add( - iv_msg = iv_msg - iv_type = 'E' - is_item = is_item ). + iv_msg = iv_msg + iv_type = 'E' + is_item = is_item ). ENDMETHOD. diff --git a/src/utils/zcl_abapgit_progress.clas.abap b/src/utils/zcl_abapgit_progress.clas.abap index eea43c145..99c10d8c4 100644 --- a/src/utils/zcl_abapgit_progress.clas.abap +++ b/src/utils/zcl_abapgit_progress.clas.abap @@ -97,8 +97,9 @@ CLASS ZCL_ABAPGIT_PROGRESS IMPLEMENTATION. ENDIF. "We only do a progress indication if enough time has passed - IF lv_time >= mv_cv_time_next AND sy-datum = mv_cv_datum_next OR - sy-datum > mv_cv_datum_next. + IF lv_time >= mv_cv_time_next + AND sy-datum = mv_cv_datum_next + OR sy-datum > mv_cv_datum_next. lv_pct = calc_pct( iv_current ). diff --git a/src/utils/zcl_abapgit_requirement_helper.clas.abap b/src/utils/zcl_abapgit_requirement_helper.clas.abap index 97d3d53e0..8fc0d8ded 100644 --- a/src/utils/zcl_abapgit_requirement_helper.clas.abap +++ b/src/utils/zcl_abapgit_requirement_helper.clas.abap @@ -143,12 +143,12 @@ CLASS ZCL_ABAPGIT_REQUIREMENT_HELPER IMPLEMENTATION. METHOD show_requirement_popup. - TYPES: BEGIN OF lty_color_line, color TYPE lvc_t_scol. - INCLUDE TYPE ty_requirement_status. - TYPES: END OF lty_color_line, - lty_color_tab TYPE STANDARD TABLE OF lty_color_line WITH DEFAULT KEY. + INCLUDE TYPE ty_requirement_status. + TYPES: END OF lty_color_line. + + TYPES: lty_color_tab TYPE STANDARD TABLE OF lty_color_line WITH DEFAULT KEY. DATA: lo_alv TYPE REF TO cl_salv_table, lo_column TYPE REF TO cl_salv_column, diff --git a/src/zcl_abapgit_merge.clas.abap b/src/zcl_abapgit_merge.clas.abap index 48ae92ca4..32bdd11a1 100644 --- a/src/zcl_abapgit_merge.clas.abap +++ b/src/zcl_abapgit_merge.clas.abap @@ -172,7 +172,7 @@ CLASS ZCL_ABAPGIT_MERGE IMPLEMENTATION. * added in source and target -sha1 = -sha1. ELSEIF lv_found_common = abap_false - AND -sha1 <> -sha1. + AND -sha1 <> -sha1. INSERT INITIAL LINE INTO TABLE mt_conflicts ASSIGNING . -path = -path. @@ -197,8 +197,8 @@ CLASS ZCL_ABAPGIT_MERGE IMPLEMENTATION. ENDIF. IF lv_found_source = abap_false - OR lv_found_target = abap_false - OR lv_found_common = abap_false. + OR lv_found_target = abap_false + OR lv_found_common = abap_false. ms_merge-conflict = |{ -name } merge conflict, not found anywhere|. CONTINUE. ENDIF. diff --git a/src/zcl_abapgit_repo_content_list.clas.abap b/src/zcl_abapgit_repo_content_list.clas.abap index 9f1387b1c..d759ed8b9 100644 --- a/src/zcl_abapgit_repo_content_list.clas.abap +++ b/src/zcl_abapgit_repo_content_list.clas.abap @@ -163,8 +163,8 @@ CLASS ZCL_ABAPGIT_REPO_CONTENT_LIST IMPLEMENTATION. ls_file-lstate = -lstate. APPEND ls_file TO -files. - IF -inactive = abap_true AND - -sortkey > c_sortkey-changed. + IF -inactive = abap_true + AND -sortkey > c_sortkey-changed. -sortkey = c_sortkey-inactive. ENDIF. diff --git a/src/zcl_abapgit_settings.clas.abap b/src/zcl_abapgit_settings.clas.abap index fc63c04c0..28a8822db 100644 --- a/src/zcl_abapgit_settings.clas.abap +++ b/src/zcl_abapgit_settings.clas.abap @@ -388,8 +388,8 @@ CLASS ZCL_ABAPGIT_SETTINGS IMPLEMENTATION. METHOD set_ui_theme. ms_user_settings-ui_theme = iv_ui_theme. IF ms_user_settings-ui_theme <> c_ui_theme-default - AND ms_user_settings-ui_theme <> c_ui_theme-dark - AND ms_user_settings-ui_theme <> c_ui_theme-belize. + AND ms_user_settings-ui_theme <> c_ui_theme-dark + AND ms_user_settings-ui_theme <> c_ui_theme-belize. ms_user_settings-ui_theme = c_ui_theme-default. " Reset to default ENDIF. ENDMETHOD. diff --git a/src/zcl_abapgit_skip_objects.clas.abap b/src/zcl_abapgit_skip_objects.clas.abap index d171cbac9..225838c0e 100644 --- a/src/zcl_abapgit_skip_objects.clas.abap +++ b/src/zcl_abapgit_skip_objects.clas.abap @@ -49,8 +49,7 @@ CLASS ZCL_ABAPGIT_SKIP_OBJECTS IMPLEMENTATION. rt_tadir = it_tadir. LOOP AT it_tadir INTO ls_tadir WHERE object = 'DDLS'. LOOP AT rt_tadir INTO ls_tadir_class - WHERE object = 'CLAS' AND obj_name CS ls_tadir-obj_name. - + WHERE object = 'CLAS' AND obj_name CS ls_tadir-obj_name. IF has_sadl_superclass( ls_tadir_class ) = abap_true. APPEND ls_tadir_class TO lt_lines_to_delete. ENDIF. diff --git a/src/zcl_abapgit_stage_logic.clas.abap b/src/zcl_abapgit_stage_logic.clas.abap index a566a6fba..e5615667d 100644 --- a/src/zcl_abapgit_stage_logic.clas.abap +++ b/src/zcl_abapgit_stage_logic.clas.abap @@ -63,8 +63,8 @@ CLASS ZCL_ABAPGIT_STAGE_LOGIC IMPLEMENTATION. iv_path = -path iv_filename = -filename ) = abap_true. DELETE cs_files-remote INDEX lv_index. - ELSEIF -path = zif_abapgit_definitions=>c_root_dir - AND -filename = zif_abapgit_definitions=>c_dot_abapgit. + ELSEIF -path = zif_abapgit_definitions=>c_root_dir + AND -filename = zif_abapgit_definitions=>c_dot_abapgit. " Remove .abapgit from remotes - it cannot be removed or ignored DELETE cs_files-remote INDEX lv_index. ENDIF. diff --git a/src/zcl_abapgit_transport_mass.clas.locals_imp.abap b/src/zcl_abapgit_transport_mass.clas.locals_imp.abap index 38f54c67b..8172fa4ab 100644 --- a/src/zcl_abapgit_transport_mass.clas.locals_imp.abap +++ b/src/zcl_abapgit_transport_mass.clas.locals_imp.abap @@ -229,11 +229,11 @@ CLASS lcl_transport_zipper IMPLEMENTATION. ENDMETHOD. - METHOD get_filename . + METHOD get_filename. * Generate filename CONCATENATE is_trkorr-trkorr '_' is_trkorr-as4text '_' gv_timestamp gc_zip_ext - INTO rv_filename. + INTO rv_filename. * Remove reserved characters (for Windows based systems) TRANSLATE rv_filename USING '/ \ : " * > < ? | '. @@ -256,7 +256,7 @@ CLASS lcl_transport_zipper IMPLEMENTATION. zcl_abapgit_zip=>save_binstring_to_localfile( iv_binstring = lv_zipbinstring iv_filename = get_filename( ls_trkorr ) ). - ENDLOOP. "it_trkorr + ENDLOOP. ENDMETHOD. diff --git a/src/zcl_abapgit_transport_objects.clas.abap b/src/zcl_abapgit_transport_objects.clas.abap index 393ad3df8..5fdfcc350 100644 --- a/src/zcl_abapgit_transport_objects.clas.abap +++ b/src/zcl_abapgit_transport_objects.clas.abap @@ -23,7 +23,7 @@ ENDCLASS. -CLASS zcl_abapgit_transport_objects IMPLEMENTATION. +CLASS ZCL_ABAPGIT_TRANSPORT_OBJECTS IMPLEMENTATION. METHOD constructor. @@ -46,7 +46,7 @@ CLASS zcl_abapgit_transport_objects IMPLEMENTATION. WHEN zif_abapgit_definitions=>c_state-added OR zif_abapgit_definitions=>c_state-modified. IF ls_transport_object-delflag = abap_true. zcx_abapgit_exception=>raise( |Object { ls_transport_object-obj_name - } should be added/modified, but has deletion flag in transport| ). + } should be added/modified, but has deletion flag in transport| ). ENDIF. READ TABLE is_stage_objects-local @@ -56,7 +56,7 @@ CLASS zcl_abapgit_transport_objects IMPLEMENTATION. file-filename = ls_object_status-filename. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Object { ls_transport_object-obj_name - } not found in the local repository files| ). + } not found in the local repository files| ). ELSE. io_stage->add( iv_path = ls_local_file-file-path @@ -66,7 +66,7 @@ CLASS zcl_abapgit_transport_objects IMPLEMENTATION. WHEN zif_abapgit_definitions=>c_state-deleted. IF ls_transport_object-delflag = abap_false. zcx_abapgit_exception=>raise( |Object { ls_transport_object-obj_name - } should be removed, but has NO deletion flag in transport| ). + } should be removed, but has NO deletion flag in transport| ). ENDIF. io_stage->rm( iv_path = ls_object_status-path diff --git a/src/zcl_abapgit_transport_objects.clas.testclasses.abap b/src/zcl_abapgit_transport_objects.clas.testclasses.abap index 0b0fe391d..3559c3e17 100644 --- a/src/zcl_abapgit_transport_objects.clas.testclasses.abap +++ b/src/zcl_abapgit_transport_objects.clas.testclasses.abap @@ -214,9 +214,9 @@ CLASS ltcl_transport_objects IMPLEMENTATION. ENDMETHOD. METHOD deleted_to_removed_files. given_the_transport_object( - iv_obj_name = 'CL_FOO' - iv_obj_type = 'CLAS' - iv_delflag = abap_true ). + iv_obj_name = 'CL_FOO' + iv_obj_type = 'CLAS' + iv_delflag = abap_true ). given_the_object_status( iv_obj_name = 'CL_FOO' @@ -235,9 +235,9 @@ CLASS ltcl_transport_objects IMPLEMENTATION. METHOD should_delete_all_related. "i.e. Should also delete the XMLs related to the transport objects given_the_transport_object( - iv_obj_name = 'CL_FOO' - iv_obj_type = 'CLAS' - iv_delflag = abap_true ). + iv_obj_name = 'CL_FOO' + iv_obj_type = 'CLAS' + iv_delflag = abap_true ). given_the_object_status( iv_obj_name = 'CL_FOO' @@ -323,10 +323,11 @@ CLASS ltcl_transport_objects IMPLEMENTATION. lt_staged_objects = mo_stage->get_all( ). READ TABLE lt_staged_objects TRANSPORTING NO FIELDS - WITH KEY file-filename = is_local_file-file-filename - file-path = is_local_file-file-path - file-data = is_local_file-file-data - method = zcl_abapgit_stage=>c_method-add. + WITH KEY + file-filename = is_local_file-file-filename + file-path = is_local_file-file-path + file-data = is_local_file-file-data + method = zcl_abapgit_stage=>c_method-add. IF sy-subrc <> 0. cl_abap_unit_assert=>fail( |Object { is_local_file-file-filename } not added to stage| ). ENDIF. @@ -352,8 +353,9 @@ CLASS ltcl_transport_objects IMPLEMENTATION. lt_staged_objects = mo_stage->get_all( ). READ TABLE lt_staged_objects TRANSPORTING NO FIELDS - WITH KEY file-filename = iv_filename - file-path = iv_path. + WITH KEY + file-filename = iv_filename + file-path = iv_path. IF sy-subrc <> 0. cl_abap_unit_assert=>fail( |Object { iv_filename } not removed in stage| ). ENDIF.