@@ -58,8 +58,6 @@ create or replace package body ut_suite_builder is
5858 gc_endcontext
5959 );
6060
61- gc_placeholder constant varchar2(3) := '\\%';
62-
6361 gc_integer_exception constant varchar2(1) := 'I';
6462 gc_named_exception constant varchar2(1) := 'N';
6563
@@ -218,7 +216,6 @@ create or replace package body ut_suite_builder is
218216 function get_exception_number (a_exception_var in varchar2) return integer is
219217 l_exc_no integer;
220218 l_exc_type varchar2(50);
221- l_sql varchar2(32767);
222219 function remap_no_data_found (a_number integer) return integer is
223220 begin
224221 return case a_number when 100 then -1403 else a_number end;
@@ -260,7 +257,7 @@ create or replace package body ut_suite_builder is
260257 l_exception_number_list ut_integer_list := ut_integer_list();
261258 c_regexp_for_exception_no constant varchar2(30) := '^-?[[:digit:]]{1,5}$';
262259 begin
263- /* the a_expected_error_codes is converted to a ut_varchar2_list after that is trimmed and filtered to left only valid exception numbers*/
260+ -- the a_expected_error_codes is converted to a ut_varchar2_list after that is trimmed and filtered to left only valid exception numbers
264261 l_throws_list := ut_utils.trim_list_elements(ut_utils.string_to_table(a_annotation_text, ',', 'Y'));
265262
266263 for i in 1 .. l_throws_list.count
@@ -407,18 +404,15 @@ create or replace package body ut_suite_builder is
407404 a_for_annotation varchar2,
408405 a_procedure_name t_object_name := null
409406 ) is
410- l_annotation_name t_annotation_name;
411407 l_line_no binary_integer;
412408 begin
413- if a_annotations.exists(a_for_annotation) then
414- if a_annotations(a_for_annotation).count > 1 then
415- --start from second occurrence of annotation
416- l_line_no := a_annotations(a_for_annotation).next( a_annotations(a_for_annotation).first );
417- while l_line_no is not null loop
418- add_annotation_ignored_warning( a_suite, a_for_annotation, 'Duplicate annotation %%%.', l_line_no, a_procedure_name );
419- l_line_no := a_annotations(a_for_annotation).next( l_line_no );
420- end loop;
421- end if;
409+ if a_annotations.exists(a_for_annotation) and a_annotations(a_for_annotation).count > 1 then
410+ --start from second occurrence of annotation
411+ l_line_no := a_annotations(a_for_annotation).next( a_annotations(a_for_annotation).first );
412+ while l_line_no is not null loop
413+ add_annotation_ignored_warning( a_suite, a_for_annotation, 'Duplicate annotation %%%.', l_line_no, a_procedure_name );
414+ l_line_no := a_annotations(a_for_annotation).next( l_line_no );
415+ end loop;
422416 end if;
423417 end;
424418
@@ -430,8 +424,7 @@ create or replace package body ut_suite_builder is
430424 a_invalid_annotations ut_varchar2_list
431425 ) is
432426 l_annotation_name t_annotation_name;
433- l_warning varchar2(32767);
434- l_line_no binary_integer;
427+ l_line_no binary_integer;
435428 begin
436429 if a_proc_annotations.exists(a_for_annotation) then
437430 l_annotation_name := a_proc_annotations.first;
@@ -739,9 +732,8 @@ create or replace package body ut_suite_builder is
739732
740733 while l_context_pos is not null loop
741734 l_end_context_pos := get_endcontext_position(l_context_pos, a_annotations.by_name );
742- if l_end_context_pos is null then
743- exit;
744- end if;
735+
736+ exit when l_end_context_pos is null;
745737
746738 l_context_items := ut_suite_items();
747739 --create a sub-set of annotations to process as sub-suite (context)
@@ -1156,10 +1148,8 @@ create or replace package body ut_suite_builder is
11561148 a_skip_all_objects boolean := false
11571149 ) return ut_suite_items is
11581150 l_suites ut_suite_items;
1159- l_annotations_cursor sys_refcursor;
11601151 l_annotated_objects ut_annotated_objects;
11611152 l_suite_items ut_suite_items;
1162- l_suite_data_cursor sys_refcursor;
11631153 begin
11641154 loop
11651155 fetch a_annotated_objects bulk collect into l_annotated_objects limit 10;
0 commit comments