Skip to content

Add tests demonstrating unclosed Javadoc inline tags leaving comments unformatted. - #1509

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_994306859
Oct 29, 2026
Merged

copybara-service[bot] merged 1 commit into
masterfrom
test_994306859

Conversation

@copybara-service

Copy link
Copy Markdown

Add tests demonstrating unclosed Javadoc inline tags leaving comments unformatted.

In classic Javadoc comments, an unclosed inline tag outside <pre>
(for example, an unclosed {@link ... lacking a closing }) causes lexing
to fail with a LexException in checkMatchingTags(). Because
JavadocFormatter catches LexException and returns the input string
unmodified, the comment is left completely unformatted.

Add tests reproducing this behavior with unclosed inline tags before
subsequent list items, blank lines, footer tags, and at the end of the comment.

… unformatted.

In classic Javadoc comments, an unclosed inline tag outside `<pre>`
(for example, an unclosed `{@link ...` lacking a closing `}`) causes lexing
to fail with a `LexException` in `checkMatchingTags()`. Because
`JavadocFormatter` catches `LexException` and returns the input string
unmodified, the comment is left completely unformatted.

Add tests reproducing this behavior with unclosed inline tags before
subsequent list items, blank lines, footer tags, and at the end of the comment.

PiperOrigin-RevId: 1009630980
@copybara-service
copybara-service Bot merged commit 93bb96d into master Oct 29, 2026
12 checks passed
@copybara-service
copybara-service Bot deleted the test_994306859 branch October 29, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant