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
OpenRewrite 8.9.0-SNAPSHOT, main branch, commit 0d884d4
How are you running OpenRewrite?
In IntelliJ, but also using the latest Gradle plugin, latest SNAPSHOT version.
What is the smallest, simplest way to reproduce the problem?
The following are a number of tests that can be inserted into org.openrewrite.java.tree.JavadocTest.
Each detail a minor JavaDoc parsing issue.
@TestvoidunicodeAmpersand() {
rewriteRun(
java(""" package com.foo; /** * {@code * \\u0040Override * public void method() { * } */ @SuppressWarnings class Bar { } """)
);
}
@TestvoidunicodeAccent() {
rewriteRun(
java(""" package com.foo; /** * @author Xx\\u00e9 */ class Bar { } """)
);
}
@TestvoidbadlyClosedXmlTags() {
rewriteRun(
java(""" package com.foo; /** <!--Optional:-> <urn:portalId>?</urn:portalId--> */ class Bar { } """)
);
}
@TestvoidunicodeSpace() {
rewriteRun(java(""" package com.foo; /** * Strip characters that are not allowed in an XML document : those below ASCII 32 (HEX 20 -> in java < '\\u0020') */ public class Bar { } """));
}
@TestvoidsplitAtDot() {
rewriteRun(java(""" package com.foo; /** * @see a.b.Type#method(a.b.c. * d.Type) */ class Bar { } """));
}
@TestvoidcombinedCommentsWithoutSpace() {
// solved by adding a space between */ and /*rewriteRun(java(""" package com.foo; class Bar { /** * xx *//* void method() { }*/ } """));
}
@TestvoidspaceStarAfterStartOfJavaDoc() {
// remove the * after /**rewriteRun(java(""" package com.foo; /** * * @author x */ class Bar { } """));
}
@TestvoidbracketNotClosedInJavaDoc() {
rewriteRun(java(""" package com.foo; /** * {@link Foo#method(int, int) xyz * @abc */ class Bar { } """));
}
What did you expect to see?
A green test.
I have no particular interest in exactly how the parser solves the issue (i.e., by ignoring, or correcting), just that it does not fail on the whole file.
What did you see instead?
A red test, i.e., parsing stops with an error.
The text was updated successfully, but these errors were encountered:
Thanks a lot for these detailed reports @bnaudts ! Really helpful to have them in a format we can directly run.I'll see if we can fit in a fix of these issues, as indeed this should not break parsing your project.
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
In IntelliJ, but also using the latest Gradle plugin, latest SNAPSHOT version.
What is the smallest, simplest way to reproduce the problem?
The following are a number of tests that can be inserted into
org.openrewrite.java.tree.JavadocTest
.Each detail a minor JavaDoc parsing issue.
What did you expect to see?
A green test.
I have no particular interest in exactly how the parser solves the issue (i.e., by ignoring, or correcting), just that it does not fail on the whole file.
What did you see instead?
A red test, i.e., parsing stops with an error.
The text was updated successfully, but these errors were encountered: