File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,9 +134,9 @@ create or replace package body ut_annotations as
134134 l_package_comments varchar2(32767);
135135 begin
136136 l_package_comments := regexp_substr(srcstr => a_source
137- ,pattern => '^\s*(CREATE\s+(OR\s+REPLACE)?(\s+(NON)?EDITIONABLE)?\s+)?PACKAGE(.|\s) *?(\s+(AS|IS)\s+)((.*?{COMMENT#\d+}\s?)+)'
137+ ,pattern => '^\s*(CREATE\s+(OR\s+REPLACE)?(\s+(NON)?EDITIONABLE)?\s+)?PACKAGE\s[^;] *?(\s+(AS|IS)\s+)((.*?{COMMENT#\d+}\s?)+)'
138138 ,modifier => 'i'
139- ,subexpression => 8 );
139+ ,subexpression => 7 );
140140
141141 -- parsing for package annotations
142142 return
@@ -328,7 +328,7 @@ create or replace package body ut_annotations as
328328
329329 l_source := ut_metadata.get_package_spec_source(a_owner_name, a_name);
330330
331- if l_source is null then
331+ if l_source is null or sys.dbms_lob.getlength(l_source)=0 then
332332 return null;
333333 else
334334 return parse_package_annotations(l_source);
You can’t perform that action at this time.
0 commit comments