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

(storage) Fix default host #7034

Merged
merged 1 commit into from
Dec 13, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class StorageOptions extends ServiceOptions<Storage, StorageOptions> {
private static final String API_SHORT_NAME = "Storage";
private static final String GCS_SCOPE = "https://www.googleapis.com/auth/devstorage.full_control";
private static final Set<String> SCOPES = ImmutableSet.of(GCS_SCOPE);
private static final String DEFAULT_HOST = "https://storage.googleapis.com";

public static class DefaultStorageFactory implements StorageFactory {

Expand Down Expand Up @@ -133,7 +134,7 @@ public static StorageOptions getUnauthenticatedInstance() {
@SuppressWarnings("unchecked")
@Override
public Builder toBuilder() {
return new Builder(this).setHost("storage.googleapis.com");
return new Builder(this).setHost(DEFAULT_HOST);
}

@Override
Expand All @@ -147,6 +148,6 @@ public boolean equals(Object obj) {
}

public static Builder newBuilder() {
return new Builder();
return new Builder().setHost(DEFAULT_HOST);
}
}