-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with inner Class named '$' in JavaTemplate #3623
Comments
I may found the Spot, org.openrewrite.java.internal.template.Substitutions L155 replaces all $ which are used as delimiter Same for JavaType#build Line 572 |
Nice find! sorry this didn't get a lot of traction before; it's hard to get to everything! What do you want to do now? Do you need input on anything? |
First of all, thanks an no worries. Its rarely used and I mentioned working on it ;). |
I think I made some progress.
I have a strange behavior in JavaTemplateSubstitutionTest.anyForInnerClass.
If I change Line 125 to
That makes me feel like I miss a thing here. Any suggestions? |
What version of OpenRewrite are you using?
I am using current main (Commit: d53b36f)
rewrite-java 8.5.0-SNAPSHOT
How are you running OpenRewrite?
Initially via tests in PR openrewrite/rewrite-migrate-java#285
Reproduced with test in rewrite-java directly.
What is the smallest, simplest way to reproduce the problem?
Reference an inner class with name
$
inside a JavaTemplateWhat did you expect to see?
JavaTemplate has to deal with
$
as name of inner classes.They resutl into
A$$
as FQN when defined asA.$
.What did you see instead?
__P__.<error>
What is the full stack trace of any errors you encountered?
none
Are you interested in contributing a fix to OpenRewrite?
Yes, as it blocks my PR :D
The text was updated successfully, but these errors were encountered: