oscerd opened a new pull request, #25595:
URL: https://github.com/apache/camel/pull/25595
## What
CAMEL-23414 added `HazelcastSerializationFilterHelper.applyDefault(Config)`
and applied it to the
Hazelcast configurations Camel builds itself, i.e. when the user supplies
neither a `Config` nor a
`HazelcastInstance`. CAMEL-24413 then covered
`ReplicatedHazelcastAggregationRepository#doStart()`,
which had been missed because it overrides `doStart()` without calling
`super.doStart()`.
One Camel-built configuration path was still not covered.
`HazelcastDefaultComponent#getOrCreateHzClientInstance()` builds `new
XmlClientConfigBuilder().build()`
when `hazelcastMode=client` and neither a referenced `ClientConfig` nor
`hazelcastConfigUri` is supplied,
and created the client without a default `JavaSerializationFilterConfig`.
The node-mode counterpart
`getOrCreateHzInstance()` has applied one since CAMEL-23414, so the two
modes behaved differently for an
otherwise identical endpoint configuration.
## Changes
- Added an `applyDefault(ClientConfig)` overload to
`HazelcastSerializationFilterHelper`. Both public
overloads now share a private `applyDefaultFilter(SerializationConfig)`;
`ClientConfig` exposes the
same `SerializationConfig` as `Config`, so no logic is duplicated.
- Called it on the Camel-built branch of `getOrCreateHzClientInstance()`,
mirroring
`getOrCreateHzInstance()`.
- Extended `HazelcastSerializationFilterHelperTest` with the two
`ClientConfig` cases (default applied,
user configuration respected). The existing `handlesNullConfigGracefully`
test now casts its argument,
because the new overload makes an untyped `null` ambiguous.
- Extended the existing `camel-hazelcast` section of the 4.23 upgrade guide
rather than adding a second
one, so the anchor stays unique.
A user-supplied `ClientConfig` or a pre-built `HazelcastInstance` is left
untouched, as established by
CAMEL-23414.
## Testing
`mvn test` in `components/camel-hazelcast`: **224/224 pass**, including the
5 helper tests and the 2
repository bootstrap tests. `mvn formatter:format impsort:sort` produces no
further changes.
## Backports
Branches for `camel-4.22.x`, `camel-4.18.x` and `camel-4.14.x` are prepared
and tested locally; each
stacks this change on top of the CAMEL-24413 backport, since the two edit
the same upgrade-guide section.
They will be opened once this PR is merged.
JIRA: https://issues.apache.org/jira/browse/CAMEL-24420
---
_Claude Code on behalf of oscerd_
--
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]