gnodet-bot commented on code in PR #26750:
URL: https://github.com/apache/camel/pull/26750#discussion_r4072578823
##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/AuthoringTools.java:
##########
@@ -365,6 +384,67 @@ public static JsonObject validate(ToolContext ctx, Path
dir, String file, String
static final long RELOAD_WAIT_MILLIS = 8000;
Review Comment:
💡 **Javadoc misplacement (low):** This `writeFile` Javadoc comment becomes
orphaned after the patch. `editFile` and `count()` are inserted immediately
after it, so in the resulting file this comment ends up floating before
`editFile`'s own Javadoc — and `writeFile` ends up with no Javadoc at all.
The fix is to move the insertion point: put `editFile` + `count()` (with
their Javadoc) **before** this line, so this comment stays adjacent to
`writeFile`.
Alternatively, keep the insertion order but move the `writeFile` Javadoc
**after** the `count()` method, directly above `writeFile`:
```suggestion
/** Replaces one snippet of a file and writes the result through {@link
#writeFile}, so a change to an existing file
* does not rewrite every line of it: a model that re-emits a whole file
corrupts the lines it did not mean to touch
* (CAMEL-24909). The snippet must occur exactly once; the answer says
what was replaced.
*/
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]