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
I am using id 'org.openrewrite.rewrite' version '6.8.4'
Gradle plugin 6.8.4
How are you running OpenRewrite?
I am using the Gradle plugin, and my project is a single module project.
plugins {
id 'maven-publish'
id 'groovy'
id 'idea'
id 'net.researchgate.release' version '2.8.1'
id "com.github.ben-manes.versions" version "0.36.0"
id "com.gorylenko.gradle-git-properties" version "2.3.2"
id 'java-library'
id 'org.openrewrite.rewrite' version '6.8.4'
}
rewrite {
activeRecipe("org.openrewrite.java.RemoveUnusedImports")
}
What is the smallest, simplest way to reproduce the problem?
packagecom.gaic.bue.uwd.ra.common.dataaccessclassJnbInnerClassIssue
{
classShowParseIssue {
Stringa// String getA() {// return a// }ShowParseIssue(Stringa) {
this.a = a
}
//Moving getA() before the constructor or after the setter setA(String a) seems to resolve the parsing issueStringgetA() {
returna
}
voidsetA(Stringa) {
this.a = a
}
// String getA() {// return a// }
}
}
What did you expect to see?
No parsing errors
What did you see instead?
There were problems parsing src\test\java\com\gaic\bue\uwd\ra\common\dataaccess\JnbInnerClassIssue.groovy
What is the full stack trace of any errors you encountered?
There were problems parsing some source files, run with --info to see full stack traces
There were problems parsing src\test\java\com\gaic\bue\uwd\ra\common\dataaccess\JnbInnerClassIssue.groovy
Error during rewrite dry run
No further details
Note there are other groovy classes with parsing issues which I am trying to create small examples since the code is private
@Test@Issue("https://github.com/openrewrite/rewrite/issues/4063")
voidnestedClass() {
rewriteRun(
groovy(
""" package com.gaic.bue.uwd.ra.common.dataaccess class JnbInnerClassIssue{ class ShowParseIssue { String a ShowParseIssue(String a) { this.a = a } String getA() { return a } void setA(String a) { this.a = a } } } """
)
);
}
Which results in
packagecom.gaic.bue.uwd.ra.common.dataaccessclassJnbInnerClassIssue{
classShowParseIssue {
String a
ShowParseIssue(StringagetAathis.a= a
}
String getA() {
return a
}
void setA(String a) {
this.a = a
}
}
}
What version of OpenRewrite are you using?
I am using id 'org.openrewrite.rewrite' version '6.8.4'
How are you running OpenRewrite?
I am using the Gradle plugin, and my project is a single module project.
What is the smallest, simplest way to reproduce the problem?
What did you expect to see?
No parsing errors
What did you see instead?
There were problems parsing src\test\java\com\gaic\bue\uwd\ra\common\dataaccess\JnbInnerClassIssue.groovy
What is the full stack trace of any errors you encountered?
Are you interested in contributing a fix to OpenRewrite?
The text was updated successfully, but these errors were encountered: