Skip to content

Commit 1550342

Browse files
committed
chore: Address PR comments
1 parent 80dcf14 commit 1550342

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

java-datastore/google-cloud-datastore/src/main/java/com/google/cloud/datastore/DatastoreOptions.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,12 @@ public Builder setChannelProvider(TransportChannelProvider channelProvider) {
190190

191191
@Override
192192
public DatastoreOptions build() {
193-
if (this.host == null && this.transportOptions instanceof GrpcTransportOptions) {
194-
this.setHost(DatastoreSettings.getDefaultEndpoint());
193+
if (this.host == null) {
194+
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+
}
195199
}
196200
return new DatastoreOptions(this);
197201
}

0 commit comments

Comments
 (0)