[ 
https://issues.apache.org/jira/browse/NETBEANS-2745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ARUNAVA SINHA updated NETBEANS-2745:
------------------------------------
    Issue Type: Task  (was: Bug)

> hint : Convert switch to switch expression not displayed when switch have 
> default case without break
> ----------------------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-2745
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2745
>             Project: NetBeans
>          Issue Type: Task
>          Components: java - Hints
>    Affects Versions: 11.1
>            Reporter: ARUNAVA SINHA
>            Assignee: ARUNAVA SINHA
>            Priority: Major
>
> Convert old switch statement to switch expression in following case:
> Old code:  (Assign same variable in every case with one statement)
> int x = 5;
> String str = "foo";
> switch (str)
> { case 1: str = "bar";break;
> case 2: str = "baz";break;
> default: str = "zuq"
> }
>  
> expected fix:
> int x = 5;
> String s = switch (str)
> { case 1 -> "bar";
> case 2 -> "baz";
> default -> "zuq";
> }
> But the hint is disabled in above scenario.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to