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

Tolerate weird class names, as seen in functionaljava #4401

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

timtebeek
Copy link
Contributor

They are using fj.data.$, which then leads to an empty String.

image

First noticed on recipe runs against rewrite-migrate-java, where the previous lead to:

Caused by: java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
        at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
        at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
        at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
        at org.openrewrite.java.marker.JavaSourceSet.isDeclarable(JavaSourceSet.java:333)
        at org.openrewrite.java.marker.JavaSourceSet.typesFromPath(JavaSourceSet.java:281)
        at org.openrewrite.java.marker.JavaSourceSet.build(JavaSourceSet.java:210)
        at org.openrewrite.gradle.isolated.DefaultProjectParser.parse(DefaultProjectParser.java:836)
        ... 125 more

They are using `fj.data.$`, which then leads to an empty String.
@timtebeek timtebeek requested review from pstreef and sambsnyd August 9, 2024 11:53
@timtebeek timtebeek self-assigned this Aug 9, 2024
@timtebeek timtebeek requested a review from pstreef August 9, 2024 12:24
@timtebeek
Copy link
Contributor Author

The failure to now run the receive-pr workflow on the PR after adding functionaljava to the classpath perfectly illustrates this exact issue.

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

Successfully merging this pull request may close these issues.

2 participants