What version of OpenRewrite are you using?
I am using
- Maven/Gradle plugin v5.17.1
What is the smallest, simplest way to reproduce the problem?
class ParserError {
private String method(@NonNull final String @NonNull... args) {
return "";
}
}
What is the full stack trace of any errors you encountered?
java.lang.IllegalStateException: ParserError.java is not print idempotent.
(several lines removed)
- private String method(@NonNull final String @NonNull... args) {
+ private String method(@NonNull final String[] @NonNull... args) {
return "";
}
org.openrewrite.Parser.requirePrintEqualsInput(Parser.java:52)
The NonNull is from org.eclipse.jdt.annotations, but that should work for any type annotation which can be applied to arrays and types. When a normal array is used instead of the varargs, the parser doesn't produce an error.
probably not, I only feel confident in the recipes area, not the parser
What version of OpenRewrite are you using?
I am using
What is the smallest, simplest way to reproduce the problem?
What is the full stack trace of any errors you encountered?
The NonNull is from org.eclipse.jdt.annotations, but that should work for any type annotation which can be applied to arrays and types. When a normal array is used instead of the varargs, the parser doesn't produce an error.
Are you interested in contributing a fix to OpenRewrite?
probably not, I only feel confident in the recipes area, not the parser