Minor changes (#1442)

* remove try without catch

* reduce nesting

* reduce nesting

* reduce line length
This commit is contained in:
Lars Hvam 2018-06-04 15:12:03 +02:00 committed by GitHub
parent 71bcc8afac
commit 10dbd74f57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 47 deletions

View File

@ -36,7 +36,7 @@ ENDCLASS.
CLASS zcl_abapgit_object_doma IMPLEMENTATION. CLASS ZCL_ABAPGIT_OBJECT_DOMA IMPLEMENTATION.
METHOD deserialize_texts. METHOD deserialize_texts.
@ -223,7 +223,6 @@ CLASS zcl_abapgit_object_doma IMPLEMENTATION.
CATCH cx_sy_dyn_call_param_not_found. CATCH cx_sy_dyn_call_param_not_found.
TRY.
CALL FUNCTION 'RS_DD_DELETE_OBJ' CALL FUNCTION 'RS_DD_DELETE_OBJ'
EXPORTING EXPORTING
no_ask = abap_true no_ask = abap_true
@ -241,8 +240,6 @@ CLASS zcl_abapgit_object_doma IMPLEMENTATION.
ENDTRY. ENDTRY.
ENDTRY.
ENDMETHOD. "delete ENDMETHOD. "delete

View File

@ -338,10 +338,9 @@ CLASS zcl_abapgit_objects_program IMPLEMENTATION.
ENDIF. ENDIF.
zcl_abapgit_language=>restore_login_language( ). zcl_abapgit_language=>restore_login_language( ).
ELSE. ELSEIF strlen( is_progdir-name ) > 30.
* function module RPY_PROGRAM_INSERT cannot handle function group includes * function module RPY_PROGRAM_INSERT cannot handle function group includes
IF strlen( is_progdir-name ) > 30.
" special treatment for extensions " special treatment for extensions
" if the program name exceeds 30 characters it is not a usual " if the program name exceeds 30 characters it is not a usual
" ABAP program but might be some extension, which requires the internal " ABAP program but might be some extension, which requires the internal
@ -364,7 +363,6 @@ CLASS zcl_abapgit_objects_program IMPLEMENTATION.
zcx_abapgit_exception=>raise( 'error from INSERT REPORT' ). zcx_abapgit_exception=>raise( 'error from INSERT REPORT' ).
ENDIF. ENDIF.
ENDIF. ENDIF.
ENDIF.
IF NOT it_tpool[] IS INITIAL. IF NOT it_tpool[] IS INITIAL.
INSERT TEXTPOOL is_progdir-name INSERT TEXTPOOL is_progdir-name

View File

@ -219,13 +219,12 @@ CLASS ZCL_ABAPGIT_SYNTAX_ABAP IMPLEMENTATION.
CASE <ls_match>-token. CASE <ls_match>-token.
WHEN c_token-keyword. WHEN c_token-keyword.
IF <ls_match>-offset > 0. IF <ls_match>-offset > 0
AND substring( val = iv_line off = ( <ls_match>-offset - 1 ) len = 1 ) CA '-<'.
" Delete match if keyword is part of structure or field symbol " Delete match if keyword is part of structure or field symbol
IF substring( val = iv_line off = ( <ls_match>-offset - 1 ) len = 1 ) CA '-<'.
DELETE ct_matches INDEX lv_index. DELETE ct_matches INDEX lv_index.
CONTINUE. CONTINUE.
ENDIF. ENDIF.
ENDIF.
WHEN c_token-comment. WHEN c_token-comment.
<ls_match>-length = lv_line_len - <ls_match>-offset. <ls_match>-length = lv_line_len - <ls_match>-offset.

View File

@ -69,7 +69,8 @@ CLASS ltcl_xml_output IMPLEMENTATION.
lv_value = lv_value =
'<?xml version="1.0" encoding="utf-16"?>#<abapGit version="v1.0.0">#' & '<?xml version="1.0" encoding="utf-16"?>#<abapGit version="v1.0.0">#' &
' <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">#' & ' <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">#' &
' <asx:values># <DATA># <FOO>2</FOO># <BAR>A</BAR># </DATA># </asx:values># </asx:abap>#</abapGit>#'. ' <asx:values># <DATA># <FOO>2</FOO># <BAR>A' &
'</BAR># </DATA># </asx:values># </asx:abap>#</abapGit>#'.
REPLACE ALL OCCURRENCES OF '#' IN lv_value WITH cl_abap_char_utilities=>newline. REPLACE ALL OCCURRENCES OF '#' IN lv_value WITH cl_abap_char_utilities=>newline.