You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(The problem persists even if I disable my own recipes)
What is the full stack trace of any errors you encountered?
It doesn't like some of the switch statements, but only some and I don't see why. I was able to obtain these details by adding --errors to the mvn command
[WARNING] There were problems parsing relative-path/NotificationResultHandlingIntegrationManager.java
[WARNING] java.lang.IllegalStateException: relative-path/NotificationResultHandlingIntegrationManager.java is not print idempotent.
diff --git a/absolute-path/NotificationResultHandlingIntegrationManager.java b/absolute-path/NotificationResultHandlingIntegrationManager.java
index d316ac8..9fcbe95 100644
--- a/absolute-path/NotificationResultHandlingIntegrationManager.java
+++ b/absolute-path/NotificationResultHandlingIntegrationManager.java
@@ -33,7 +33,7 @@
for (PostSendActionResult operation : postSendHookOperations) {
switch (operation) {
- case PostSendActionResult.DocumentAsyncRequestCreation documentAsyncRequestCreation -> {
+ defaultcase PostSendActionResult.DocumentAsyncRequestCreation documentAsyncRequestCreation -> {
entityManager.persist(documentAsyncRequestCreation.documentAsyncRequest());
}
}
org.openrewrite.Parser.requirePrintEqualsInput(Parser.java:52)
The text was updated successfully, but these errors were encountered:
I think the issue is that OpenRewrite does not yet fully support Java's pattern matching for switch expressions and statements as previewed starting with Java 17 and then released with Java 21. This needs to be fixed in the parser (and printer).
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
I am using the Maven plugin, and my project is a multi-module project
pom.xml
rewrite.yml
(The problem persists even if I disable my own recipes)
What is the full stack trace of any errors you encountered?
It doesn't like some of the switch statements, but only some and I don't see why. I was able to obtain these details by adding
--errors
to the mvn commandThe text was updated successfully, but these errors were encountered: