You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "ARUNAVA SINHA (Jira)" <ji...@apache.org> on 2019/09/11 08:27:00 UTC

[jira] [Updated] (NETBEANS-2745) Hint : Convert switch to switch expression not displayed when switch have default case without break

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

ARUNAVA SINHA updated NETBEANS-2745:
------------------------------------
    Fix Version/s: 11.1

> 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: Bug
>          Components: java - Hints
>    Affects Versions: 11.1
>            Reporter: ARUNAVA SINHA
>            Assignee: ARUNAVA SINHA
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 11.1
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> isuue is linked to https://issues.apache.org/jira/browse/NETBEANS-2349
>  
> 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
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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