RFR: JDK-8288624: Cleanup CommentHelper.getText0 [v2]

Jonathan Gibbons jjg at openjdk.org
Mon Jul 11 17:31:39 UTC 2022


On Mon, 11 Jul 2022 15:43:59 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

> > I'm not convinced the added overload to commentTagsToContent is the best solution.
> 
> Thanks. I'll investigate your suggestions. Avoiding new overloads would be good.

After investigating, it seems the need for this only arises from 6 cases in 1 comment in 1 class. (`Locale#serialPersistentFields`) and those cases all seem like a workaround for the issue that before this work, `{@link}` did not work in `@serialField` comments (because of `CommentHelper.getText`). Now that `{@link}` should work as expected, we can update the comment for `Locale#serialPersistentFields` and thus get rid of the special case behavior that was added. And going forward, the rule can be no different from anywhere else: that relative links are updated depending on the file in which they will appear.

-------------

PR: https://git.openjdk.org/jdk/pull/9438


More information about the compiler-dev mailing list