[
https://issues.apache.org/jira/browse/NETBEANS-1677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sarvesh Kesharwani resolved NETBEANS-1677.
------------------------------------------
Resolution: Not A Problem
> Proposed suggestion hint to prevent RuntimeException "error: the switch
> expression does not cover all possible input values."
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: NETBEANS-1677
> URL: https://issues.apache.org/jira/browse/NETBEANS-1677
> Project: NetBeans
> Issue Type: Improvement
> Reporter: ARUNAVA SINHA
> Assignee: Sarvesh Kesharwani
> Priority: Major
> Labels: NB-JDK12
>
> enum Days {
> SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY;
> }
> public static void demonstrateLackingCaseInSwitchExpression()
> {
> int numLetters = switch (day) {
> case MONDAY, SUNDAY -> {
> break 6;
> }
> case TUESDAY -> 7;
> case THURSDAY, SATURDAY -> 8;
> case WEDNESDAY -> 9;
> };
> }
> Runtime Exception :" the switch expression does not cover all possible input
> values."
> Proposed new hint should prevent this situation, it should suggest user if
> he/she missed to add default case or any enum value case.
>
--
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