slachiewicz opened a new pull request, #1000:
URL: https://github.com/apache/maven-wagon/pull/1000

   A wagon keeps its connection, session and transfer listeners, so a lookup 
must never hand out a shared instance. Up to 3.5.3 every wagon was declared 
`instantiation-strategy="per-lookup"` in its Plexus metadata. Since #926 moved 
the providers to JSR-330, the same behaviour comes from Sisu's default 
(unscoped) scope, so it holds only as long as nobody annotates a wagon 
`@Singleton`. Nothing tested that.
   
   This adds `testWagonLookupReturnsNewInstance` to `WagonTestCase`: it looks 
up the provider's protocol twice and asserts two different instances. Every 
provider test that extends `WagonTestCase` inherits it.
   
   Verified:
   - passes in all 23 provider test classes (file, ftp, http/https, lightweight 
http/https, scm git/svn, scp, sftp, scpexe, dav/davs, including the preemptive 
variants)
   - fails with `expected: not same but was: FileWagon@…` when `FileWagon` is 
annotated `@Singleton`
   
   While checking #926 I also compared every former `@plexus.component` with 
its JSR-330 form. The two implicit Plexus singletons 
(`LightweightHttpWagonAuthenticator`, `PrompterUIKeyboardInteractive`) are 
`@Singleton`, everything that was `per-lookup` is unscoped, and the 
`@plexus.configuration` default values were already Java field initializers. 
Nothing else needs to change.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to