Reduce memory consumption during deserialize (#4389)

* Reduce memory consumption during deserialize 

Fix issue with namespace objects

https://github.com/abapGit/abapGit/pull/4357

* Unit test
This commit is contained in:
Marc Bernard 2021-01-08 05:57:47 -05:00 committed by GitHub
parent eb5fdfb404
commit 6b23aaa0fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -278,6 +278,9 @@ CLASS zcl_abapgit_objects_files IMPLEMENTATION.
METHOD get_file_pattern.
rv_pattern = filename( iv_ext = '*' ).
" Escape special characters for use with 'covers pattern' (CP)
REPLACE ALL OCCURRENCES OF '#' IN rv_pattern WITH '##'.
REPLACE ALL OCCURRENCES OF '+' IN rv_pattern WITH '#+'.
ENDMETHOD.

View File

@ -125,10 +125,23 @@ CLASS ltcl_objects_files IMPLEMENTATION.
METHOD get_file_pattern.
DATA ls_item TYPE zif_abapgit_definitions=>ty_item.
cl_abap_unit_assert=>assert_equals(
exp = 'zlf.prog.*'
act = mo_cut->get_file_pattern( ) ).
ls_item-obj_type = 'prog'.
ls_item-obj_name = '/test/zlf'.
CREATE OBJECT mo_cut
EXPORTING
is_item = ls_item.
cl_abap_unit_assert=>assert_equals(
exp = '##test##zlf.prog.*'
act = mo_cut->get_file_pattern( ) ).
ENDMETHOD.
ENDCLASS.