Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
12.6
-
None
-
None
-
Product Version: Apache NetBeans IDE 12.6
Java: 17.0.1; Java HotSpot(TM) 64-Bit Server VM 17.0.1+12-LTS-39
Runtime: Java(TM) SE Runtime Environment 17.0.1+12-LTS-39
System: Mac OS X version 11.6.1 running on x86_64; UTF-8; en_AU (nb)
User directory: /Users/brettryan/Library/Application Support/NetBeans/12.6
Cache directory: /Users/brettryan/Library/Caches/NetBeans/12.6
Product Version: Apache NetBeans IDE 12.6 Java: 17.0.1; Java HotSpot(TM) 64-Bit Server VM 17.0.1+12-LTS-39 Runtime: Java(TM) SE Runtime Environment 17.0.1+12-LTS-39 System: Mac OS X version 11.6.1 running on x86_64; UTF-8; en_AU (nb) User directory: /Users/brettryan/Library/Application Support/NetBeans/12.6 Cache directory: /Users/brettryan/Library/Caches/NetBeans/12.6
Description
Using the new preview feature for JDK 17, switch expressions are incorrectly hinting at an infinite recursion.
Using the AWS s3 API as an example where a continuation token is returned with the response to require further calls to be made, or null if it is the end the IDE hints on an infinite recursion within the return switch expression.
No such hint is given with the traditional imperative check.