oscerd opened a new pull request, #27255:
URL: https://github.com/apache/camel/pull/27255

   ## Summary
   
   Follow-up to 
[CAMEL-23414](https://issues.apache.org/jira/browse/CAMEL-23414). Camel applies 
its default `JavaSerializationFilterConfig` only to the Hazelcast 
configurations it builds itself, and uses a user-supplied configuration 
unchanged. So far this was described only in the 4.18 and 4.21 upgrade guides. 
This PR makes it visible:
   
   - **Docs**: a new "Java serialization filter" section in 
`hazelcast-summary.adoc`. It explains which instances get Camel's default 
filter and that a user-supplied `Config`, `ClientConfig`, `hazelcastConfigUri` 
or instance is used as-is. It also shows how to declare a filter in XML and in 
Java (member and client), and the JVM-wide `jdk.serialFilter` alternative.
   - **WARN**: `HazelcastDefaultComponent` logs a WARN, once per managed 
instance, when it starts a member or client from a user-supplied `Config` or 
`ClientConfig` (bean or `hazelcastConfigUri`). It only does so when that 
configuration declares no `JavaSerializationFilterConfig` and no JVM-wide 
`jdk.serialFilter` is set. The user's configuration is still not modified.
   - **Upgrade guide**: a note in the 4.23 `camel-hazelcast` section.
   
   Apart from the new log line, nothing changes at runtime.
   
   ## Tests
   
   - New `HazelcastUserConfigSerializationFilterWarningTest`:
     - the WARN is logged once for a user `Config` without a filter, with two 
endpoints sharing a named instance;
     - it is not logged when a filter is declared;
     - it is not logged for the configuration Camel builds by default;
     - it is logged for a user `ClientConfig` in client mode, against a local 
member.
   - Revert check: without the production change, the two "warns" tests fail 
(`expected: <1> but was: <0>`).
   - camel-hazelcast module: 237 tests, 0 failures.
   - Full reactor `mvn clean install -DskipTests -DskipITs`, which also 
regenerates the catalog copy of the component doc.
   - After rebasing onto current `main`, the targeted tests were re-run. 
Upstream had no changes in camel-hazelcast or in
     its catalog doc copy in the meantime.
   - Checked against Hazelcast 5.4.0:
     - the documented XML (member and client) and Java snippets produce the 
expected filter;
     - Hazelcast's Java deserialization honours a JVM-wide `jdk.serialFilter` 
when no `JavaSerializationFilterConfig` is set, which is why the WARN is 
skipped in that case.
   
   Jira: https://issues.apache.org/jira/browse/CAMEL-25229
   
   _Claude Code on behalf of Andrea Cosentino_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to