gnodet commented on PR #30709: URL: https://github.com/apache/camel/pull/30709#issuecomment-7131286756
Thanks for the thorough review @davsclaus and @oscerd — all points addressed in the latest push. **Use `getDisconnectCode()` instead of string matching** ✅ Verified against the MINA SSHD 2.18.0 bytecode: - `ClientUserAuthService.tryNext()` creates `new SshException(14, "No more authentication methods available")` — disconnect code 14 = `SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE`. Now detected via `e.getDisconnectCode() == SshConstants.SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE`. - `DefaultAuthFuture.verify()` (called when the future resolves to `false`) creates a plain `SshException` with no disconnect code (defaults to 0) and the message "Authentication failed while waiting N msec." — still covered by the string check. The two conditions are ORed together. The "No more authentication methods available" string check is gone; `SshConstants` import added. **Upgrade guide entry** ✅ Added a new section to `camel-4x-upgrade-guide-4_24.adoc` documenting the behaviour change, with a note that transient connection failures are still retried, and a cross-reference to CAMEL-27019 / camel-sftp for parity context. **Component doc** ✅ Updated the "Authentication Errors" section in `mina-sftp-component.adoc` (and the generated catalog copy) to describe the actual error message and the no-retry behaviour for rejected logins. **Test nits** ✅ - `java.util.Comparator` FQCN in `deleteDir` → `import java.util.Comparator` + simple name - `assertTrue(attempts == 0, ...)` → `assertEquals(0, passwordAttempts.get(), ...)`; `assertEquals` import added - `testTransientFailureIsStillRetried` Javadoc tightened to name the exception type and the specific code path being exercised **Optional (`newSession` leak on auth failure)** — noted; deferred as a pre-existing issue, out of scope for this fix. _Hermès on behalf of gnodet_ -- 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]
