rewrite: ChangePackage doesn't handle classes with GWT JNSI methods
What version of OpenRewrite are you using?
I am using OpenRewrite v8.44.2 with the ChangePackage recipe.
What is the smallest, simplest way to reproduce the problem?
type: specs.openrewrite.org/v1beta/recipe
name: com.yourorg.ChangePackageExample
displayName: Rename package name example
recipeList:
- org.openrewrite.java.ChangePackage:
oldPackageName: old_package_name
newPackageName: new_package_name
package old_package_name;
class A {
native void alert(String msg) /*-{ $wnd.alert(msg); }-*/;
}
What did you expect to see?
package new_package_name;
class A {
native void alert(String msg) /*-{ $wnd.alert(msg); }-*/;
}
What did you see instead?
OpenRewrite didn’t touch the file. It seems like it ignores Java classes with native methods and/or trailing comment.
See reproducer
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (15 by maintainers)
I am thinking something like this, but I haven’t tested it and I am unsure what the code I removed here was exactly supposed to do:
No, i didn’t look into the parser side yet and i probably don’t have time until after the weekend.
Hmm… looks i’ve made some errror on my side, the reproducer isn’t correct.