gnodet commented on PR #29805:
URL: https://github.com/apache/camel/pull/29805#issuecomment-6857636436
Thanks for the detailed review, @davsclaus.
Addressed in the new push:
- **Branch**: rebased on main so only the CAMEL-26913 commit remains (the
two CAMEL-26901 commits are dropped).
- **Item 1**: Fixed `loadProperties` to warn on malformed properties and
return empty props instead of crashing. The 3-arg overload returns `boolean`
(false = malformed) and does NOT call the consumer, so config write commands
(`config set`/`config unset`) refuse to operate on a malformed file. Warning
message includes the full absolute path and escape advice. Added `TODO` comment
about the raw terminal printer in `augmentWithUserConfiguration`. Added tests
for the 3-arg and 2-arg overloads.
- **Item 2**: Fixed NPE on `{}` JSON (null-check on
`config.getMap("plugins")` in both `isPluginCommand` and `getActivePlugins`).
`getPluginConfig` now throws `RuntimeCamelException` on corrupt/truncated JSON
instead of silently returning null, so `getOrCreatePluginConfig` does NOT
overwrite a corrupt-but-existing file. Added `toRealPath()` before the atomic
move to handle symlinks. Wrapped `isPluginCommand` and `printAvailablePlugins`
in try-catch so a corrupt config doesn't crash non-critical paths. Improved
`savePluginConfigPreservesExistingFileOnWrite` test. Added tests for `{}`,
truncated JSON, and corrupt config.
- **Item 3**: Updated `CamelShDiscoveryTest` to use the new CDS path with
the BASEDIR cksum hash. Added `cksumHash()` and `basedir()` helpers in
`FakeJava`. Added `twoInstallDirectoriesGetDistinctArchives` test.
- **Scope**: changed "Fixes" to "Part of" in the PR description so JIRA
stays open.
_Hermès on behalf of @gnodet._
--
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]