You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the smallest, simplest way to reproduce the problem?
@Test
void unclosedBraceOnLink() {
rewriteRun(
java(
"""
class Test {
/**
* {@link int
* Some other text.
* See {@link java.lang.String}
* @param arg description
*/
void method(String arg) {
}
}
"""
)
);
}
in JavadocTest
What did you see instead / What is the full stack trace of any errors you encountered?
Caused by: org.openrewrite.java.JavaParsingException: Failed to convert for the following cursor stack:--- BEGIN PATH ---
JCCompilationUnit(sourceFile = Test.java)
JCClassDecl(name = Test, line = 1)
--- END PATH ---
... 32 more
Caused by: java.lang.AssertionError
at org.openrewrite.java.isolated.ReloadableJava17JavadocVisitor.whitespaceBefore(ReloadableJava17JavadocVisitor.java:1074)
at org.openrewrite.java.isolated.ReloadableJava17JavadocVisitor.visitDocComment(ReloadableJava17JavadocVisitor.java:340)
at org.openrewrite.java.isolated.ReloadableJava17JavadocVisitor.visitDocComment(ReloadableJava17JavadocVisitor.java:52)
at com.sun.tools.javac.tree.DCTree$DCDocComment.accept(DCTree.java:138)
at com.sun.source.util.DocTreeScanner.scan(DocTreeScanner.java:84)
at org.openrewrite.java.isolated.ReloadableJava17ParserVisitor.formatWithCommentTree(ReloadableJava17ParserVisitor.java:2385)
at org.openrewrite.java.isolated.ReloadableJava17ParserVisitor.convert(ReloadableJava17ParserVisitor.java:1758)
... 30 more
Context
the problem goes away if I close the {@link with } on the same line. But this mistake is kind of popular when I looked through the open-source Java code, so I think we should do a better job handling this admittedly invalid input.
What version of OpenRewrite are you using?
Current main = 7de8e67
What is the smallest, simplest way to reproduce the problem?
in
JavadocTest
What did you see instead / What is the full stack trace of any errors you encountered?
Context
{@link
with}
on the same line. But this mistake is kind of popular when I looked through the open-source Java code, so I think we should do a better job handling this admittedly invalid input.<!-- -->
in JavaDoc #4248 is relatedThe text was updated successfully, but these errors were encountered: