-
Notifications
You must be signed in to change notification settings - Fork 362
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
Problem parsing unknown Javadoc tag #3833
Conversation
Thanks for getting this started @TheMarvelFan ! I've removed two classes from your other PR, which squash merge should resolve As for the changes here probably best to add a test to verify that the changes here correctly handle the cases mentioned in #3750 (comment) |
Once we're satisfied with the changes (but only then!), we should replicate the same to the other parsers to also fix this in Java 8, 11 and 21. |
Hi @timtebeek, |
Hi @TheMarvelFan ; you seem to have added two files to the root of your repository fork: You likely intended to add those elsewhere; what's the reason you're using the file upload and not a git push? |
Hi, |
Yes you can use the same fork for multiple open pull requests, but it helps to start a branch for each new development you start, and not commit to the main branch. Otherwise you indeed run the risk of conflicts and diverging commits on the main branch. |
I understand. I am still quite new to contributing to open source, but with time I will get better. Is there something I can do right now to correct this problem? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @TheMarvelFan! The changes are looking good so far, thank you for fixing this bug!
I've added a few comments with information on the changes. Please let me know if you have any questions!
rewrite-java-test/src/test/java/org/openrewrite/java/UnknownJavadocTagTest.java
Outdated
Show resolved
Hide resolved
rewrite-java-17/src/main/java/org/openrewrite/java/isolated/ReloadableJava17JavadocVisitor.java
Outdated
Show resolved
Hide resolved
rewrite-java-17/src/main/java/org/openrewrite/java/isolated/ReloadableJava17JavadocVisitor.java
Outdated
Show resolved
Hide resolved
Hi @traceyyoshima, |
rewrite-java-17/src/main/java/org/openrewrite/java/isolated/ReloadableJava17JavadocVisitor.java
Outdated
Show resolved
Hide resolved
@timtebeek It looks like the build is failing due to the marker implementation. Once that's fixed, I think the changes look good and we're ready to update the other parsers. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nearly there!
rewrite-java-17/src/main/java/org/openrewrite/java/isolated/ReloadableJava17JavadocVisitor.java
Outdated
Show resolved
Hide resolved
rewrite-java-17/src/main/java/org/openrewrite/java/isolated/ReloadableJava17JavadocVisitor.java
Outdated
Show resolved
Hide resolved
rewrite-java-17/src/main/java/org/openrewrite/java/isolated/ReloadableJava17JavadocVisitor.java
Outdated
Show resolved
Hide resolved
@TheMarvelFan I've updated the PR with a few finishing touches, thank you for your work on this PR! |
….randomId()', and test
…ndomId() only when it is used as a parameter in an LST constructor.
…loadableJava17JavadocVisitor.java Replacing the modified ReloadableJava17JavadocVisitor.java with original file.
…n/java/org/openrewrite/java/isolated/ReloadableJava17JavadocVisitor.java
…org/openrewrite/java/UnknownJavadocTagTest.java Changed location of added file.
…eading opening brace Removed the file "UnkownJavadocTagTest.java", and added the tests it contained to this file.
…vadocTagTest.java Removed the now obselete file as the tests it contained are now in rewrite/rewrite-java-tck/src/main/java/org/openrewrite/java/tree/JavadocTest.java
Restored sourceBefore method to its original, and modified the visitReturn method to deal with the leading curly brace before the return annotation. Also added a private UUID uuid to ReloadableJava17JavadocVisitor/LeadingBraceMarkers to follow convention.
Added overlooked annotations
…loadableJava17JavadocVisitor.java
…loadableJava17JavadocVisitor.java
…loadableJava17JavadocVisitor.java
18427f4
to
7251ec4
Compare
Referencing issue
What's changed?
Modified the sourceBefore() method and visiteReturn() method to handle leading curly brace '{' with return annotations, i.e., cases like '{@return}' and '{@return}'. I will be adding commits that also modify the JavaDocPrinter to include the leading '{' when printing the modified javadoc.
Anyone you would like to review specifically?
@traceyyoshima or @timtebeek
Checklist