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

Warnings hints for Convert rule switch to Traditional switch

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • java - Hints

    Description

      Implementation of warning hints for  "Convert rule switch to Traditional switch"

      Use case:

      Actual code:

      public void test(int i){
      String result;
      switch

      { case 1 -> System.out.println("One"); case 2 -> System.out.println("Two"); default -> System.out.println("Default"); }

      }

      Warning Hints : "Convert to traditional switch"

      After Fix:

      public void test(int i){
      String result;
      switch

      { case 1 : System.out.println("One"); break; case 2 : System.out.println("Two"); break; default: System.out.println("Default"); break; }

      }

      Attachments

        Issue Links

          Activity

            People

              mohansarilla SARILLA MOHANARAO
              vikas.prabhakar vikas kumar prabhakar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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