minor: Use /** not /// style comments. #20849
[P1] Project-wide rule leaves existing /// comments failing Checkstyle
Finding: This RegexpSingleline is configured at Checker scope, so every Java source and test file processed by the inherited Maven Checkstyle plugin is checked. The current head still contains 17 matching lines in sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java and extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java; those unchanged files will produce violations and prevent CI from passing.
Suggestion: Convert the remaining documentation comments to Javadoc or explicitly scope/exclude the rule so the new Checkstyle policy does not fail on existing sources.
🟡 Changes recommended
The new project-wide Checkstyle rule rejects 17 existing /// comment lines in two unchanged Java source files, so CI will fail until those comments are migrated or the rule is deliberately scoped.
Reviewed 3 of 3 changed files; findings in 1 file. Coverage included the full supplied new-review merge-base diff and surrounding Checkstyle/source context.
Validation: git diff --check passed for the supplied three-file diff; no build or tests were run.
| Severity | Findings |
| --- | ---: |
| P0 | 0 |
| P1 | 1 |
| P2 | 0 |
| P3 | 0 |
| Total | 1 |
<!-- mergelens:review -->
---
This is an automated review by Codex GPT-5.6-Luna(max)
After addressing the findings or replying to the comments, you can request another review from me to trigger a new automated review.
As we are using jdk25, I think we can try some new jdk features.
The markdown style comment introduced in jdk23, which dones't require HTML/link/code tags embeded in the comments, makes comments simpler and easy to read.
If we place the consistency as the first priority, then we can impose this rule.
If we place the consistency as the first priority, then we can impose this rule.
I understand this question is a matter of taste and there is not one correct answer. For me I prefer consistency, since something seems strange to me about having different styles of comments in different files.
🟢 Approval recommended
The updated head converts the remaining /// comments and retains the project-wide Checkstyle guard without introducing a correctness or compatibility issue. The prior finding is resolved: the current head contains no Java lines matching ^\s///.
Reviewed 5 of 5 changed files. This updated-head pass started with the supplied 2-file incremental diff, then covered the full 5-file merge-base diff and surrounding Checkstyle/Javadoc context.
Validation: git diff --check passed; no Java lines matching ^\s/// remain. No build or tests were run.
<!-- mergelens:review -->
---
This is an automated review by Codex GPT-5.6-Luna(max)
🐻 Makes sense.
One option that could be considered in the future: In other projects I work on, we decided that we "like" the new markdown comment style, but also didn't want to update everything at once. The rule there is that a file in itself has to be consistent, and that any file you touch that uses the traditional syntax should be switched to ///. Not perfect, since diffs over quite a long period can have many more changes, but overall that has been working fine.
amaechler
gianm
Most existing files use
/**. I don't feel one is really inherently better than the other, and it's nice to keep things consistent, so this patch rules out the///style.