lobtx commented on PR #29579: URL: https://github.com/apache/camel/pull/29579#issuecomment-6780920732
> The mechanical `<tt>` → `<code>` and `<p/>` → `<p>` replacements look correct overall, but I noticed that three of the touched Javadoc blocks contain pre-existing factual errors that the PR modifies without fixing: > > 1. **`FileUtil.java` — `isWindowsDrive()` has completely wrong Javadoc.** > The description says _"Determines whether the URI has a scheme (e.g. file:, classpath: or http:)"_, and the `@param` names `uri` — but the actual method is `isWindowsDrive(String part)` and checks whether a string looks like a Windows drive letter (`C:`). The `@return` line was touched by this PR. It would be good to fix the description, `@param` name and `@return` semantics at the same time. > 2. **`IOHelper.java` — typo _"at the of the text"_.** > Line touched by this PR reads: _"This implementation appends a `\n` as line terminator at the of the text."_ — missing the word `end`. > 3. **`ObjectHelper.java` — nonsensical sentence _"Returns the first non null object `null`."_** > The sentence doesn't make sense as written. The method returns `Optional<Object>`, so something like _"Returns the first non-null object, or an empty `Optional` if all are null."_ would be accurate. > > These are all pre-existing issues, not regressions introduced by this PR, but since the lines are already being touched it's a good opportunity to clean them up. Thanks, all three were right. Fixed in the second commit: - `FileUtil`: the Javadoc above `isWindowsDrive` actually belonged to `hasScheme` (the next method, which had none), so I moved it there and wrote a proper one for `isWindowsDrive`. - `IOHelper`: "at the end of the text". - `ObjectHelper#firstNotNull`: reworded, and the `@return` now says what the Optional contains. -- 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]
