[
https://issues.apache.org/jira/browse/NETBEANS-4829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Bien closed NETBEANS-4829.
----------------------------------
Fix Version/s: ?
Resolution: Fixed
this too got fixed at some point
> Incorrect hint about unused assigned value in switch statement
> --------------------------------------------------------------
>
> Key: NETBEANS-4829
> URL: https://issues.apache.org/jira/browse/NETBEANS-4829
> Project: NetBeans
> Issue Type: Bug
> Components: java - Hints
> Affects Versions: 12.1
> Environment: Java 15, Windows 10
> Reporter: dennis lucero
> Priority: Minor
> Fix For: ?
>
>
> In some switch statements NetBeans displays a hint saying the assigned value
> is never used even though it is:
> {code:java}
> public final class SwitchAssignedValueNeverUsed {
> public enum E {
> A,
> B;
> }
> public static void main(final String[] args) {
> E e = E.A;
> String s;
> switch (e) {
> case A -> s = "a"; // Hint: The assigned value is never used
> case B -> s = "b";
> default ->
> throw new AssertionError(e.name());
> }
> System.out.println(s);
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
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