Replace the deprecated plexus-utils APIs in provider code - #976
Merged
Conversation
StringOutputStream and IOUtil are deprecated, and plexus-utils Base64 is superseded by java.util.Base64 now the line requires Java 8. The Basic credentials keep using String.getBytes() with the platform default charset -- that is WAGON-627 territory and deliberately not changed here.
slachiewicz
marked this pull request as ready for review
September 3, 2026 22:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drops the three deprecated or superseded
plexus-utilsAPIs left in provider code, per #975:wagon-ssh-commonStreamKnownHostsProvider—StringOutputStreamandIOUtil.copy/IOUtil.closebecome aByteArrayOutputStreamand try-with-resources.toString()without an explicit charset keeps the platform defaultStringOutputStreamused.wagon-sshAbstractJschWagon—IOUtil.closebecomes a localcloseQuietly, keeping the null check and swallowedIOException.wagon-http-lightweightLightweightHttpWagon—plexus-utilsBase64becomesjava.util.Base64. Base64 output is ASCII, soencodeToStringmatches the previousnew String(encodeBase64(...)).Deliberately unchanged: the Basic credentials still go through
String.getBytes()with the platform default charset. That is WAGON-627 / #787 territory and needs its own decision.Verified:
mvn installon the three modules and their prerequisites → BUILD SUCCESS,wagon-http-lightweight219/0/0 (7 skipped),wagon-ssh-common10/0/0,wagon-ssh-common-test19/0/0. Both changed paths are covered —FileKnownHostsProviderextendsStreamKnownHostsProvider, andLightweightHttpWagonWithPreemptiveAuthenticationTestexercises the Basic header. Negative control: corrupting the encoded credentials turned that suite red (4 failures), so the passing run gates the change rather than skipping it.spotless:checkpasses.This change was created with AI assistance.