Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/rewrite/java-version-21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ recipeList:
- org.openrewrite.java.migrate.UpgradePluginsForJava21
- org.openrewrite.java.migrate.DeleteDeprecatedFinalize
- org.openrewrite.java.migrate.RemovedSubjectMethods
- org.openrewrite.java.migrate.SwitchPatternMatching
# - org.openrewrite.java.migrate.SwitchPatternMatching

---
type: specs.openrewrite.org/v1beta/recipe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void projectWithJavaxInject() {
spec -> spec.after(actual -> assertThat(actual)
.contains("<groupId>jakarta.inject</groupId>")
.contains("<artifactId>jakarta.inject-api</artifactId>")
.containsPattern("<version>[0-9]+\\.[0-9]+\\.[0-9]+</version>")
.containsPattern("<version>[0-9]+\\.[0-9]+\\.[0-9]+[\\w\\W]*</version>")
Copy link
Member

Choose a reason for hiding this comment

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

This looks a bit odd to me:

\w A word character: [a-zA-Z_0-9]
\W A non-word character: [^\w]

So then to me, [\\w\\W]* would seem equivalent to .*; correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's correct, I tried with .*? at first and that didn't match but I didn't realize it was due to the conservative matching

Copy link
Member

Choose a reason for hiding this comment

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

Fixed in 0840ea5

.actual())
)
);
Expand Down