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

Find JavaVersion markers on any source file #3795

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

timtebeek
Copy link
Contributor

What's changed?

Let HasJavaVersion return a TreeVisitor instead of a JavaIsoVisitor

What's your motivation?

Set a property for use of virtual threads if on Java 21, with a non-scanning recipe.

Necessary for proper functioning of this recipe & tests:

Any additional context

We add the Java version marker to all source files in
https://github.com/openrewrite/rewrite-maven-plugin/blob/1d205eac8f43a17395ed317b8e8984aa25990a59/src/main/java/org/openrewrite/maven/MavenMojoProjectParser.java#L296

Necessary for proper functioning of this recipe & tests:
- openrewrite/rewrite-spring#460
@timtebeek timtebeek added bug Something isn't working enhancement New feature or request labels Dec 8, 2023
@timtebeek timtebeek self-assigned this Dec 8, 2023
Copy link
Contributor

@knutwannheden knutwannheden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the marker won't get added processed by the native build, but I guess that won't be an issue.

@timtebeek timtebeek merged commit 38f3cfd into main Dec 8, 2023
@timtebeek timtebeek deleted the find-javaversion-markers-on-any-source-file branch December 8, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants