Skip to content
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

JDK21 string templates not works #966

Closed
GrapeBaBa opened this issue Dec 14, 2023 · 7 comments
Closed

JDK21 string templates not works #966

GrapeBaBa opened this issue Dec 14, 2023 · 7 comments

Comments

@GrapeBaBa
Copy link

What happened?

If the code contains string templates, spotlessApply will throw errors.

What did you want to happen?

should works fine.

@lost22git
Copy link

lost22git commented Jan 18, 2024

same problem

Screenshot 2024-01-18 210927

@tisonkun
Copy link

Downstream reports - diffplug/spotless#2046

@bmarwell
Copy link

Duplicate of #930

@cushon
Copy link
Contributor

cushon commented Mar 2, 2024

Duplicate of #930

Maybe not necessarily? Text blocks and string templates are separate features, although they can be used together.

For what it's worth, there were some recent changes to google-java-format to add initial support for string templates, it's possible that well be helpful for palanti-java-format (one, two, three)

@bmarwell
Copy link

You are right. It is a preview feature in JDK 21, got me confused :)

@mhagnumdw
Copy link

You are right. It is a preview feature in JDK 21, got me confused :)

And in JDK 23: Remove the String Templates preview feature: https://bugs.openjdk.org/browse/JDK-8329949

@GrapeBaBa
Copy link
Author

Thanks guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants