We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80dcf14 commit 1550342Copy full SHA for 1550342
1 file changed
java-datastore/google-cloud-datastore/src/main/java/com/google/cloud/datastore/DatastoreOptions.java
@@ -190,8 +190,12 @@ public Builder setChannelProvider(TransportChannelProvider channelProvider) {
190
191
@Override
192
public DatastoreOptions build() {
193
- if (this.host == null && this.transportOptions instanceof GrpcTransportOptions) {
194
- this.setHost(DatastoreSettings.getDefaultEndpoint());
+ if (this.host == null) {
+ if (this.transportOptions instanceof GrpcTransportOptions) {
195
+ this.setHost(DatastoreSettings.getDefaultEndpoint());
196
+ } else if (this.transportOptions instanceof HttpTransportOptions) {
197
+ this.setHost(com.google.datastore.v1.client.DatastoreFactory.DEFAULT_HOST);
198
+ }
199
}
200
return new DatastoreOptions(this);
201
0 commit comments