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

   Part of #2272, for the 1.9.x line. The deprecation lint is not enabled on 
this line and this PR does not enable it: of the 206 usages a build with 
`-Xlint:deprecation` reports, 184 are the line's own 
`ServiceLocator`/`Service`, `FileTransformer` and `spi.log` deprecations, which 
1.9.x implements on purpose and which javac reports at the import under Java 8 
even inside a deprecated or suppressed class. The 22 usages with a real 
replacement change:
   
   - `DefaultFileProcessor.readChecksum` parses the checksum file itself, which 
is what the deprecation of `ChecksumUtils.read(File)` asks for.
   - The Redisson lock uses the `Duration`-based `tryAcquire`.
   - The demo Maven plugin gets its `RepositorySystem` by `@Inject` constructor 
injection instead of the deprecated `@Component`.
   - `DefaultMirrorSelector.add` is called with the explicit `blocked` flag, 
and `TransferResource` with the repository id.
   - The HTTP test server computes its SHA-1 header with `MessageDigest` and 
decodes Basic credentials with `java.util.Base64` instead of Jetty's `B64Code`.
   - `ChecksumUtilTest` is suppressed at class level: its subject is the 
deprecated `File` and `byte[]` variants.
   
   Verified: clean `mvn install` on JDK 21 with the lint and `-Xmaxwarns 
100000` added temporarily → BUILD SUCCESS, 1065 tests, 0 failures, 184 
deprecation locations left and none of the six symbols above; `mvn -pl 
maven-resolver-demos/maven-resolver-demo-maven-plugin -Prun-its verify` → the 
`resolve-artifact` IT passes.
   
   ---
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   


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