File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -337,12 +337,19 @@ create or replace package body ut_annotations as
337337
338338 function get_package_annotations(a_owner_name varchar2, a_name varchar2) return typ_annotated_package is
339339 l_source clob;
340+ ex_package_is_wrapped exception;
341+ pragma exception_init(ex_package_is_wrapped, -24241);
340342 begin
341343
342344 -- TODO: Add cache of annotations. Cache invalidation should be based on DDL timestamp.
343345 -- Cache garbage collection should be executed once in a while to remove annotations cache for packages that were dropped.
344-
345- l_source := ut_metadata.get_package_spec_source(a_owner_name, a_name);
346+
347+ begin
348+ l_source := ut_metadata.get_package_spec_source(a_owner_name, a_name);
349+ exception
350+ when ex_package_is_wrapped then
351+ null;
352+ end;
346353
347354 if l_source is null or sys.dbms_lob.getlength(l_source)=0 then
348355 return null;
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ exec ut_coverage.coverage_start_develop();
4040@@lib/ RunTest .sql ut_annotations/ ut_annotations .parse_package_annotations .ParsePackageLevelAnnotationMultilineDeclare .sql
4141@@lib/ RunTest .sql ut_annotations/ ut_annotations .parse_package_annotations .ParsePackageLevelAnnotationWithKeyValue .sql
4242@@lib/ RunTest .sql ut_annotations/ ut_annotations .parse_package_annotations .ParsePackageLevelAnnotationWithMultilineComment .sql
43+ @@lib/ RunTest .sql ut_annotations/ ut_annotations .parse_package_annotations .GetAnnotationsFromWrappedPackage .sql
4344
4445@@ut_expectations/ ut .expect .to_be_between .GivesFailureForDifferentValues .sql
4546@@ut_expectations/ ut .expect .to_be_between .GivesFailureWhenActualIsNull .sql
Original file line number Diff line number Diff line change 1+ CREATE or replace PACKAGE tst_wrapped_pck wrapped
2+ a000000
3+ 369
4+ abcd
5+ abcd
6+ abcd
7+ abcd
8+ abcd
9+ abcd
10+ abcd
11+ abcd
12+ abcd
13+ abcd
14+ abcd
15+ abcd
16+ abcd
17+ abcd
18+ abcd
19+ 9
20+ a9 c6
21+ BFZG852xhrH+ZghWHu3GpsAjsYwwgwFtmJ7hfy/pO3MYPpTk1jvUXeLLSBs48Y66RPOZmSwO
22+ tdAK4wIZubhyoYqfNPukcsRhJHrcsdmQU6c7MJt96TjbQty7bG3LvKuFVGWjizd5GkTmJ7dk
23+ Ktg41QYvCqco0ZidUx+EE+yoSt2ucz1rQYcomGbMx3gS4Xj7Vm8=
24+ /
25+
26+ declare
27+ l_pck_annotation ut_annotations.typ_annotated_package;
28+ begin
29+ l_pck_annotation := ut_annotations.get_package_annotations(user, 'TST_WRAPPED_PCK');
30+ if l_pck_annotation.procedure_annotations.count = 0 and l_pck_annotation.package_annotations.count = 0 then
31+ :test_result := ut_utils.tr_success;
32+ end if;
33+ end;
34+ /
35+
36+ drop package tst_wrapped_pck;
You can’t perform that action at this time.
0 commit comments