2 Replies Latest reply on Apr 16, 2020 8:56 PM by Vadim Tropashko-Oracle

    Blank lines are doubled when formatting in Windows

    MarkusHohloch

      Hi,

       

      Philipp Salvisberg and I found an issue with the formatter in SQL Developer v19.4. After formatting the code, blank lines will be doubled.

       

      Start:

      select * from dual;

      -- test comment
      select * from dual;

      First format result under macOS. We can repeat formatting it. Result stays the same.

      SELECT * 
        FROM dual;

      -- test comment
      SELECT *
        FROM dual;

      First format result under Windows:

      SELECT * 
        FROM dual;


      -- test comment
      SELECT *
        FROM dual;

      Second format result under Windows:

      SELECT * 
        FROM dual;




      -- test comment
      SELECT *
        FROM dual;

      We guess the problem is the preference Line breaks -> After statements -> Preserve original.

       

      Obviously Preserve original does not work on any platform. The change to Single break seams to work.

      But in this case on (Philipps) macOS the number of lines reduces with each formatting call until there is only one empty line left. We think this is a bug of the formatter Java class and not of the Arbori program.

       

      We checked the default settings. For Line breaks -> After statements -> Double break. This works differently under Windows and macOS as well.

       

      Thank you and best regards

      Markus