Skip to content

Commit ba07c3f

Browse files
committed
Merge pull request #838 from ajkannan/fix-endpoint
Fix datastore endpoint
2 parents e1a17f0 + df86a44 commit ba07c3f

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ protected String defaultHost() {
130130
String host = System.getProperty(
131131
com.google.datastore.v1beta3.client.DatastoreHelper.LOCAL_HOST_ENV_VAR,
132132
System.getenv(com.google.datastore.v1beta3.client.DatastoreHelper.LOCAL_HOST_ENV_VAR));
133-
return host != null ? host : super.defaultHost();
133+
return host != null ? host : com.google.datastore.v1beta3.client.DatastoreFactory.DEFAULT_HOST;
134134
}
135135

136136
@Override

gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/spi/DefaultDatastoreRpc.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ public DefaultDatastoreRpc(DatastoreOptions options) {
5454
if (fullURL.charAt(fullURL.length() - 1) != '/') {
5555
fullURL = fullURL + '/';
5656
}
57-
fullURL = fullURL + "datastore/"
58-
+ com.google.datastore.v1beta3.client.DatastoreFactory.VERSION + "/projects/"
57+
fullURL = fullURL
58+
+ com.google.datastore.v1beta3.client.DatastoreFactory.VERSION
59+
+ "/projects/"
5960
+ options.projectId();
6061
clientBuilder = clientBuilder.projectId(null).projectEndpoint(fullURL);
6162
}

0 commit comments

Comments
 (0)