Uploaded image for project: 'Apache NetBeans Infra'
  1. Apache NetBeans Infra
  2. NETBEANSINFRA-267

Source/Format fails if using switch and default (in Version 12.5)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • Windows NetBeans 12.5

    Description

      Example

      public class FormatterFails {{{    }}

      public static void main(String[] args) {
        String s = "A";{{        }}

        switch (s) {
          case "A":
            System.out.println("it's A");
            break;{{            }}

          case "B":
            System.out.println("it's B");
            break;

      //  default:
      //    System.out.println("def.");
      //un-commenting the default block causes format to fail

      //(menu: Source/Format or Alt+Shift+F)
      }}}

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            gcchris67 Christian Mahler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: