oscerd opened a new pull request, #25600:
URL: https://github.com/apache/camel/pull/25600
Backport of CAMEL-24413 (#25566) and CAMEL-24420 (#25595) to `camel-4.18.x`.
Both fixes complete the work started in CAMEL-23414, which applied a default
`JavaSerializationFilterConfig` to the Hazelcast configurations Camel builds
itself — that is, when the
user supplies neither a `Config`/`ClientConfig` nor a `HazelcastInstance`.
Two Camel-built paths were
missed at the time and are still unfiltered on this branch.
## CAMEL-24413 — ReplicatedHazelcastAggregationRepository
The class extends `HazelcastAggregationRepository` but overrides `doStart()`
without calling
`super.doStart()`, so it kept its own copy of the bootstrap block and never
picked up the CAMEL-23414
change. `HazelcastSerializationFilterHelper.applyDefault(cfg)` is now
applied before
`Hazelcast.newHazelcastInstance(cfg)`, matching the parent class.
The added test asserts **both** repository bootstrap paths, so they cannot
drift apart again.
## CAMEL-24420 — Camel-built client configurations
`HazelcastDefaultComponent#getOrCreateHzClientInstance()` builds `new
XmlClientConfigBuilder().build()`
for `hazelcastMode=client` when neither a referenced `ClientConfig` nor
`hazelcastConfigUri` is supplied,
and applied no filter. The node-mode counterpart has applied one since
CAMEL-23414, so the two modes
behaved differently for an otherwise identical endpoint configuration.
An `applyDefault(ClientConfig)` overload was added, sharing the existing
logic through a private
`applyDefaultFilter(SerializationConfig)`.
A user-supplied `Config`/`ClientConfig` or a pre-built `HazelcastInstance`
is left untouched throughout,
as established by CAMEL-23414.
## Differences from the main-branch commits
- The tests use JUnit assertions rather than AssertJ, because
`camel-hazelcast` does not have
`assertj-core` on its test classpath on this branch.
- The upgrade-guide entries live in `camel-4x-upgrade-guide-4_18.adoc` under
a new `4.18.4 to 4.18.5` section instead of the 4.23 guide.
The two commits are stacked in one PR on purpose: they edit the same
upgrade-guide section, so separate
branches would conflict on merge.
## Testing
`mvn test` in `components/camel-hazelcast` on this branch: the 5
`HazelcastSerializationFilterHelperTest`
cases and the 2 `HazelcastAggregationRepositorySerializationFilterTest`
cases all pass.
JIRA: https://issues.apache.org/jira/browse/CAMEL-24413 and
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]