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

Error hint to fix the '--enable-preview' features in Java Ant Project

    XMLWordPrintableJSON

Details

    Description

      Suppose we had used switch-expression in Java application (JDK-12)

      e.g.,

      int a = switch (num)

      {      case 1 ->1;     default->2; }

      ;

      It will show the below error:

      switch expressions are a preview feature and are disabled by default.
      (use --enable-preview to enable switch expressions)

       

      NetBeans doesn't provide the fix.

      Currently manually need to add '--enable-preview" in ant configuration file .

      Attachments

        Issue Links

          Activity

            People

              arunava.sinha ARUNAVA SINHA
              arunava.sinha ARUNAVA SINHA
              Votes:
              0 Vote for this issue
              Watchers:
              1 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 - 0.5h
                  0.5h