Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f82a3b5

Browse files
committed
Cleanup
1 parent 66de806 commit f82a3b5

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

source/core/ut_utils.pkb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ create or replace package body ut_utils is
2525
gc_owner_hash constant integer(11) := dbms_utility.get_hash_value( ut_owner(), 0, power(2,31)-1);
2626
gc_open_chars constant varchar2(4):= chr(91) || chr(123) || chr(40) || chr(60); -- [{(
2727
gc_close_chars constant varchar2(4):= chr(93) || chr(125) || chr(41) || chr(62); -- ]})>
28-
28+
gc_max_plsql_source_len constant integer := 32767;
29+
2930
function surround_with(a_value varchar2, a_quote_char varchar2) return varchar2 is
3031
begin
3132
return case when a_quote_char is not null then a_quote_char||a_value||a_quote_char else a_value end;
@@ -677,8 +678,6 @@ create or replace package body ut_utils is
677678
l_token_count binary_integer;
678679
l_has_ml_comment boolean := false;
679680
begin
680-
681-
-- Guard: empty source
682681
if a_source.count = 0 then
683682
return a_source;
684683
end if;
@@ -747,10 +746,10 @@ create or replace package body ut_utils is
747746
l_pos := greatest(l_ml_start, l_comment_start, l_text_start, l_eq_text_start);
748747
else
749748
l_pos := least(
750-
case when l_ml_start > 0 then l_ml_start else 32767 end,
751-
case when l_comment_start > 0 then l_comment_start else 32767 end,
752-
case when l_text_start > 0 then l_text_start else 32767 end,
753-
case when l_eq_text_start > 0 then l_eq_text_start else 32767 end
749+
case when l_ml_start > 0 then l_ml_start else gc_max_plsql_source_len end,
750+
case when l_comment_start > 0 then l_comment_start else gc_max_plsql_source_len end,
751+
case when l_text_start > 0 then l_text_start else gc_max_plsql_source_len end,
752+
case when l_eq_text_start > 0 then l_eq_text_start else gc_max_plsql_source_len end
754753
);
755754
end if;
756755

0 commit comments

Comments
 (0)