Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #9910, metadata-report support a separate configuration username and password #9921

Merged
merged 1 commit into from Jun 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -123,9 +123,13 @@ public URL toUrl() throws IllegalArgumentException {
map.putAll(convert(map, null));
// put the protocol of URL as the "metadata"
map.put("metadata", url.getProtocol());
return new URL("metadata", url.getUsername(), url.getPassword(), url.getHost(),
url.getPort(), url.getPath(), map);

return new URL("metadata",
StringUtils.isBlank(url.getUsername()) ? this.getUsername() : url.getUsername(),
StringUtils.isBlank(url.getPassword()) ? this.getPassword() : url.getPassword(),
url.getHost(),
// address port is priority
this.getPort() == null ? url.getPort() : url.getPort(this.getPort()),
url.getPath(), map);
}

public String getProtocol() {
Expand Down