Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2941

Hint "convert rule to switch" not shown with Gradle - openjdk12 - --enable-preview

    XMLWordPrintableJSON

Details

    Description

      in the project's build.gradle are these specifications:

      compileJava {
          options.compilerArgs.addAll(['--enable-preview']) 
      }
      
      run {
          jvmArgs(['--enable-preview'])
      }
       
      

      A program containing

      switch (string) {
           case"a123" -> System.out.println("a123");
           ...
       }

      compiles and runs well in the IDE.

       

      if "old" switch format like

      switch (string) {
           case "a123":          
                 System.out.println("a123");
                 break;
           ...
       }

      is used, not hint

      convert to rule switch

      is shown

       

      Attachments

        Issue Links

          Activity

            People

              lkishalmi Laszlo Kishalmi
              hlein Helmut Leininger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m