Closed atb-brown closed 2 years ago
The good news is that the new syntax is completely opt-in, so I can just use the traditional syntax for now.
Assuming that this works with the latest versions of the plugin which uses a newer version of google-java-format?
This works for me with the latest release if you run the formatting with a newer JDK version which supports the syntax.
Describe the bug I'm getting a formatting exception when I use the
->
style switch statements that are now possible through JDK 13.To Reproduce
Using Maven 3.6.3 and Google's Java format:
mvn fmt:format
(Also breaks withmvn fmt:check
)Expected behavior I would figure this would
Additional context While the new switch syntax comes from JDK13, I'm using JDK14. I also reverted the above switch statement code to the traditional switch syntax and everything ran fine.