Skip to content

Tolerate weird class names, as seen in functionaljava#4401

Merged
timtebeek merged 3 commits intomainfrom
tolerate-weird-class-names
Aug 9, 2024
Merged

Tolerate weird class names, as seen in functionaljava#4401
timtebeek merged 3 commits intomainfrom
tolerate-weird-class-names

Conversation

@timtebeek
Copy link
Copy Markdown
Member

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
Copy Markdown
Member 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