Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQLDev 23.1, SQLcl 23.3 Bug: Formatter breaks code when String contains ';/'

Philipp SalvisbergDec 9 2023 — edited Dec 9 2023

Dear SQL Developer team,

When you format the following code in SQL Developer 23.1 or SQLcl 23.3

begin
   dbms_output.put_line(';/');
end;
/

then the formatter result looks similar to this:

begin
   dbms_output.put_line(';
/');
end;
/

The result might differ based on the formatter settings. However, what always happens is that a line break is added between the semicolon and the slash. This might break the code.

A SQLDev user reported this issue based on real code that used encoded HTML entities followed by a slash in strings, e.g. '</'.

Here's also a screenshot that shows the problem in SQLcl:

The culprit is the format method in the oracle.dbtools.app.Format class (at the end).

It would be nice if this could be fixed in one of the coming versions.

Thank you very much.

This post has been answered by thatJeffSmith-Oracle on Dec 11 2023
Jump to Answer
Comments
Post Details
Added on Dec 9 2023
4 comments
1,002 views