@@ -30,34 +30,38 @@ create or replace type body ut_be_empty as
3030 overriding member function run_matcher(self in out nocopy ut_be_empty, a_actual ut_data_value) return boolean is
3131 l_result boolean;
3232 begin
33- if a_actual is of (ut_data_value_refcursor) then
34- declare
35- l_actual ut_data_value_refcursor := treat(a_actual as ut_data_value_refcursor);
33+ if a_actual is of(ut_data_value_refcursor) then
34+ declare
35+ l_actual ut_data_value_refcursor := treat(a_actual as ut_data_value_refcursor);
3636 begin
3737 if l_actual.data_value is not null then
3838 l_result := l_actual.is_empty;
3939 else
4040 l_result := false;
4141 end if;
4242 end;
43- elsif a_actual is of (ut_data_value_anydata) then
43+ elsif a_actual is of(ut_data_value_anydata) then
4444 declare
45- l_actual ut_data_value_anydata := treat(a_actual as ut_data_value_anydata);
46- l_type_name VARCHAR2(61);
47- l_type anytype;
48- begin
49- if a_actual.is_null() then
50- l_result := false;
51- elsif l_actual.data_value.gettype(l_type) in (dbms_types.typecode_varray,dbms_types.typecode_table,dbms_types.typecode_namedcollection) THEN
52- ut_assert_processor.set_xml_nls_params();
53- l_type_name := l_actual.data_value.gettypename();
54- l_Type_name := substr(l_type_name,instr(l_type_name,'.')+1);
55- l_result := xmltype(l_actual.data_value).getclobval() = '</'||l_type_name||'>';
56- ut_assert_processor.reset_nls_params();
57- ELSE
45+ l_actual ut_data_value_anydata := treat(a_actual as ut_data_value_anydata);
46+ l_type_name varchar2(61);
47+ l_type anytype;
48+ begin
49+ if l_actual.data_value.gettype(l_type) in
50+ (dbms_types.typecode_varray, dbms_types.typecode_table, dbms_types.typecode_namedcollection) then
51+ if a_actual.is_null() then
52+ l_result := false;
53+ else
54+ ut_assert_processor.set_xml_nls_params();
55+ l_type_name := l_actual.data_value.gettypename();
56+ l_type_name := substr(l_type_name, instr(l_type_name, '.') + 1);
57+ l_result := xmltype(l_actual.data_value).getclobval() = '<' || l_type_name || '/>';
58+ ut_assert_processor.reset_nls_params();
59+ end if;
60+ else
5861 ut_utils.debug_log('Failure - ut_be_empty.run_matcher can only be used with collections and cursors');
5962 self.error_message := 'The matcher can only be used with collections and cursors';
60- end if;
63+ l_result := null;
64+ end if;
6165 end;
6266 else
6367 l_result := (self as ut_matcher).run_matcher(a_actual);
0 commit comments