CAMEL-23562: camel-xmpp - upgrade Smack from 4.3.5 to 4.4.8#24958
Conversation
The smack-java7 module no longer exists in Smack 4.4 and is replaced by smack-java8. DefaultExtensionElement was removed: unparsed JiveProperties extensions are now represented by StandardExtensionElement, with flat child elements mapped to headers as before. Stanza logging uses the no-arg toXML() since toXML(null) is ambiguous against the 4.4 Element overloads. The camel-xmpp container integration tests fail identically on smack 4.3.5 in the same environment (TLS handshake against the test server), so their outcome is unchanged by this upgrade; unit tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
gnodet
left a comment
There was a problem hiding this comment.
Clean dependency upgrade — all changes are well-targeted and the API migration is correct.
Version bump: 4.3.5 → 4.4.8 ✅
Module rename: smack-java7 → smack-java8 (removed in Smack 4.4) ✅
XmppBinding: DefaultExtensionElement → StandardExtensionElement with updated iteration pattern (getElements() + getElementName()/getText() instead of getNames() + getValue()) — semantically equivalent for flat child elements. ✅
XmppLogger: toXML(null) → toXML() (no-arg form avoids ambiguity with the new Element overload in 4.4) ✅
Upgrade guide: Thorough entry documenting the module rename, the StandardExtensionElement replacement, and linking to the Smack 4.4 readme for further behavioral changes. ✅
LGTM.
Reviewed with Claude Code on behalf of gnodet. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
✅ POM dependency changes: targeted tests included Changed properties: smack-version Modules affected by dependency changes (1)
🔬 Scalpel shadow comparison — Scalpel: 10 tested, 28 compile-only — current: 9 all testedMaveniverse Scalpel detected 38 affected modules (current approach: 9).
|
there was a single test failure with previous version based on this comment for me #22867 (comment) |
Motivation
CAMEL-23562: upgrade Smack to the 4.4.x line (4.4.8 is the latest stable on Maven Central; 4.5 is still in beta). We were on 4.3.5, released in 2019.
Changes
smack-version4.3.5 → 4.4.8;smack-java7(gone in 4.4) replaced bysmack-java8in the camel-xmpp pom.XmppBinding:DefaultExtensionElementwas removed in Smack 4.4 — the fallback branch for an unparsed JiveProperties extension now uses its replacementStandardExtensionElement, mapping flat child elements to headers with the same header-filter application as before. (The primaryJivePropertiesExtensionpath is unchanged.)XmppLogger:stanza.toXML(null)is ambiguous against the 4.4Elementoverloads (toXML(XmlEnvironment)vstoXML(String)) — switched to the no-argtoXML().Testing
*IT, XMPP server via test-infra) fail in my environment withSSLHandshakeException: Remote host terminated the handshake— identically on current main with Smack 4.3.5 (verified by running the baseline first: same 1 failure + 6 errors, same exception). So their outcome is unchanged by this upgrade; the pre-existing test-server TLS issue can be looked at separately.mvn clean install -DskipTestsfrom root: success, no stale generated files.No backport: dependency upgrade, main/4.22.0 only.
Claude Code on behalf of Andrea Cosentino (@oscerd).
🤖 Generated with Claude Code