slachiewicz commented on PR #903: URL: https://github.com/apache/maven-wagon/pull/903#issuecomment-5227663778
Rebased onto master and brought over the two fixes from #902, now that #915 has landed and there is a harness to check them against. **The agent guard.** The constructor references defeated it. A constructor reference resolves its class when the reference is *evaluated*, which happens at the call site in `agentIdentityRepository()` — outside the `try` in `identitiesFrom`. So a missing connector class threw `NoClassDefFoundError` straight past the catch, which is what the javadoc claimed could not happen: ``` methodref: ESCAPED the guard: NoClassDefFoundError lambda : caught: NoClassDefFoundError ``` **The key preference.** master targets Java 8 as well, and the JDK only grew EdDSA in Java 15; before that JSch needs a provider such as Bouncy Castle, which is not a dependency. The base `SignatureEdDSA` in the JSch jar says so outright — `"SignatureEdDSA requires Java15+."` — so a stray `id_ed25519` would be selected and fail even with a usable `id_rsa` beside it. Demoted rather than skipped, so a lone `id_ed25519` is still found; three unit tests cover both orderings on any JDK. **Verified against the suite this time**, which is the whole point of taking #915 first: `-Dssh-tests -Dssh-embedded=true` gives **42 tests, 0 failures** against a real embedded MINA sshd, and the full reactor is green. One note for review: I applied the `ScpHelper` change by hand rather than copying the file from the 3.x branch. Copying it dragged in three things master had already cleaned up — `IOUtil.close` in place of try-with-resources, some resurrected commented-out `executeCommand` lines, and a reverted comment typo fix. The diff here is the Ed25519 change and nothing else. -- 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]
