formatting

This commit is contained in:
spencergibb
2021-03-29 18:07:17 -04:00
parent 9b9b6838b6
commit 50d2f9d334
3 changed files with 4 additions and 8 deletions

View File

@@ -346,10 +346,8 @@ public class ConfigClientProperties {
result.username = explicitCredentials.username;
}
result.password = URLDecoder.decode(result.password,
StandardCharsets.UTF_8.toString());
result.username = URLDecoder.decode(result.username,
StandardCharsets.UTF_8.toString());
result.password = URLDecoder.decode(result.password, StandardCharsets.UTF_8.toString());
result.username = URLDecoder.decode(result.username, StandardCharsets.UTF_8.toString());
return result;
}
catch (MalformedURLException | UnsupportedEncodingException e) {

View File

@@ -96,8 +96,7 @@ public class GitCredentialsProviderFactory {
// useful for token based login gh-1602
// see
// https://stackoverflow.com/questions/28073266/how-to-use-jgit-to-push-changes-to-remote-with-oauth-access-token
this.logger.debug(
"Constructing UsernamePasswordCredentialsProvider for URI " + uri);
this.logger.debug("Constructing UsernamePasswordCredentialsProvider for URI " + uri);
provider = new UsernamePasswordCredentialsProvider(username, (String) null);
}
else if (hasText(passphrase)) {

View File

@@ -68,8 +68,7 @@ public class GitCredentialsProviderFactoryTests {
@Test
public void testCreateForServerWithUsernameAndNoPassword() {
CredentialsProvider provider = this.factory.createFor(HTTPS_GIT_REPO, USER, "",
null, false);
CredentialsProvider provider = this.factory.createFor(HTTPS_GIT_REPO, USER, "", null, false);
assertThat(provider).isNotNull();
assertThat(provider instanceof UsernamePasswordCredentialsProvider).isTrue();
}