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

java.lang.IllegalArgumentException: Could not parse as Java #428

Closed
koppor opened this issue Nov 21, 2023 · 1 comment
Closed

java.lang.IllegalArgumentException: Could not parse as Java #428

koppor opened this issue Nov 21, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@koppor
Copy link
Contributor

koppor commented Nov 21, 2023

I am trying to reproduce an issue. Thereby, I am running JUnit5BestPractices on the codebase without any other recipe.

I get

All sources parsed, running active recipes: org.jabref.config.rewrite.cleanup
The recipe produced an error. Please report this to the recipe author.

> Task :rewriteRun FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':rewriteRun'.
> java.lang.RuntimeException: Error while visiting src\test\java\org\jabref\gui\externalfiles\FileFilterUtilsTest.java: java.lang.IllegalArgumentException: Could not parse as Java
    org.openrewrite.java.internal.template.JavaTemplateParser.lambda$compileTemplate$11(JavaTemplateParser.java:245)
    java.base/java.util.Optional.orElseThrow(Optional.java:403)
    org.openrewrite.java.internal.template.JavaTemplateParser.compileTemplate(JavaTemplateParser.java:245)

Deep link to failing file: https://github.com/koppor/jabref/blob/675fcf7a56c0159a0c48c62e1723bff1d9b29c73/src/test/java/org/jabref/gui/externalfiles/FileFilterUtilsTest.java#L21

  • gradle
  • id 'org.openrewrite.rewrite' version '6.5.4'
  • rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.5.0"))
@koppor koppor added the bug Something isn't working label Nov 21, 2023
@koppor
Copy link
Contributor Author

koppor commented Nov 27, 2023

Fixed at "Bump org.openrewrite.recipe:rewrite-recipe-bom from 2.5.0 to 2.5.1"

JabRef/jabref#10667

image

Thus, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

1 participant