Skip to content

Commit 0b6e1ae

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 3183 b: refs/heads/master c: e0aaaba h: refs/heads/master i: 3181: 86cea53 3179: 2b66c9b 3175: 3c887eb 3167: 1935c91
1 parent d3343cf commit 0b6e1ae

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 4d2fe25b88f32abb9cc4c3d4bc01fbfde1221a79
2+
refs/heads/master: e0aaaba871960a006fb82dc5972c015ea987c980
33
refs/heads/travis: e21ee7b88a5edc3f3d8c71f90c3fc32abf7e8dd6
44
refs/heads/gh-pages: 4e0561bb4504bf647db669a14417b2b2c87ba45d
55
refs/heads/pubsub-alpha: 1a0e970f265af871e02274085b9662b3fe29058b

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ private static boolean includesScheme(String url) {
8989
}
9090

9191
private static String removeScheme(String url) {
92-
if (url.startsWith("https://")) {
93-
return url.substring("https://".length());
94-
} else if (url.startsWith("http://")) {
95-
return url.substring("http://".length());
92+
if (url != null) {
93+
if (url.startsWith("https://")) {
94+
return url.substring("https://".length());
95+
} else if (url.startsWith("http://")) {
96+
return url.substring("http://".length());
97+
}
9698
}
9799
return url;
98100
}

trunk/gcloud-java-datastore/src/test/java/com/google/gcloud/datastore/LocalGcdHelper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,7 @@ public static void main(String... args) throws IOException, InterruptedException
309309
public static boolean isActive(String projectId) {
310310
try {
311311
StringBuilder urlBuilder = new StringBuilder("http://localhost:").append(PORT);
312-
urlBuilder.append("/datastore/" + com.google.datastore.v1beta3.client.DatastoreFactory.VERSION
313-
+ "/projects/").append(projectId).append(":lookup");
312+
urlBuilder.append("/datastore/v1beta3/projects/").append(projectId).append(":lookup");
314313
URL url = new URL(urlBuilder.toString());
315314
try (BufferedReader reader =
316315
new BufferedReader(new InputStreamReader(url.openStream(), UTF_8))) {

0 commit comments

Comments
 (0)