gnodet-bot commented on code in PR #30217: URL: https://github.com/apache/camel/pull/30217#discussion_r4588004367
########## docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc: ########## @@ -1413,6 +1413,18 @@ consumer cache of a consumer template evicts the polling consumer (see `maximumC queue is still returned. A polling consumer that was never started still waits for a message, as before. A caller that loops on `receive()` should stop on a `null` result. +=== camel-main - OS environment variables can have underscores between the words of an option + +An OS environment variable for a camel-main option can now have underscores between the words of the option name. For +example, `CAMEL_VAULT_GCP_SERVICE_ACCOUNT_KEY` and `CAMEL_VAULT_GCP_SERVICEACCOUNTKEY` both set +`camel.vault.gcp.serviceAccountKey`, and `CAMEL_MAIN_SHUTDOWN_TIMEOUT` sets `camel.main.shutdownTimeout`. This is how the Review Comment: The upgrade guide cites the camelCase form (`serviceAccountKey`, `shutdownTimeout`), but `envVariableToKey()` stores keys via `key.toLowerCase(Locale.US)` and explicitly documents its `@return` as "the configuration key, **in lower case**". The unit tests in this same PR assert: ``` "camel.vault.gcp.serviceaccountkey" "camel.main.shutdowntimeout" ``` Camel's property binding is case-insensitive, so this works at runtime — but the guide is inconsistent with the method's own Javadoc added in this PR. Consider: ``` both set `camel.vault.gcp.serviceaccountkey`, and `CAMEL_MAIN_SHUTDOWN_TIMEOUT` sets `camel.main.shutdowntimeout`. ``` (Or note that the actual configuration key is lowercase but Camel accepts the camelCase form too.) -- 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]
