errael opened a new issue, #5109:
URL: https://github.com/apache/netbeans/issues/5109
### Apache NetBeans version
Apache NetBeans 16
### What happened
With the following, there's no way to suppress the warning `Variable x is
never read`. Fortunately the `remove unused` action does nothing. Note:
--enable-preview.
```
public class unused {
public String foo(Integer o) {
return switch(o) {
case Integer x -> "one"; // <<<<< hint: remove unused
};
}
}
```
### How to reproduce
_No response_
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Linux harmony 6.0.6-76060006-generic #202210290932~1667401208~22.04~d2df702
SMP PREEMPT_DYNAMIC Wed N x86_64 x86_64 x86_64 GNU/Linux
### JDK
openjdk 11.0.2 2019-01-15 OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
### Apache NetBeans packaging
Apache NetBeans binary zip
### Anything else
_No response_
### Are you willing to submit a pull request?
No
### Code of Conduct
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
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