Skip to content

chore: Move introductory text for Javadoc examples into the <pre> block.#12217

Merged
jinseopkim0 merged 2 commits intomainfrom
datastore_doc
Mar 27, 2026
Merged

chore: Move introductory text for Javadoc examples into the <pre> block.#12217
jinseopkim0 merged 2 commits intomainfrom
datastore_doc

Conversation

@jinseopkim0
Copy link
Copy Markdown
Contributor

b/413078744

@jinseopkim0 jinseopkim0 requested a review from a team as a code owner March 26, 2026 19:20
@jinseopkim0 jinseopkim0 requested a review from lqiu96 March 26, 2026 19:20
@jinseopkim0 jinseopkim0 enabled auto-merge (squash) March 26, 2026 19:20
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request moves descriptive Javadoc text from standard paragraphs into code blocks as comments. The reviewer recommends reverting these changes to maintain idiomatic Javadoc formatting and semantic correctness, providing specific suggestions to keep the text as preceding paragraphs for better readability in generated documentation.

Comment on lines 38 to +39
* <pre>
* // In order to use the emulator for a JUnit 4 test you might do something like this:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While moving the introductory text into the

 block makes it more convenient for copy-pasting, it is generally better for Javadoc readability to have descriptive text as a paragraph before the code example. This approach makes the generated documentation cleaner and more semantically correct. The previous implementation was more idiomatic for Javadoc.

Suggested change
* <pre>
* // In order to use the emulator for a JUnit 4 test you might do something like this:
* <p>In order to use the emulator for a JUnit 4 test you might do something like this:</p>
*
* <pre>

Comment on lines 29 to +30
* <pre>
* // Example for connecting to a datastore:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better Javadoc readability and semantic correctness, introductory text for code examples should be in a paragraph preceding the

 block. Placing it as a comment inside the block, as done here, can make the generated documentation less clean. The original approach is generally preferred.

Suggested change
* <pre>
* // Example for connecting to a datastore:
* <p>Example for connecting to a datastore:</p>
*
* <pre>

@jinseopkim0 jinseopkim0 added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Mar 26, 2026
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Mar 26, 2026
@jinseopkim0 jinseopkim0 merged commit 0715c85 into main Mar 27, 2026
96 checks passed
@jinseopkim0 jinseopkim0 deleted the datastore_doc branch March 27, 2026 19:08
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.

4 participants