File tree Expand file tree Collapse file tree
branches/tswast-patch-1/gcloud-java-datastore/src/main/java/com/google/gcloud/spi Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60- refs/heads/tswast-patch-1: e1a50bc0063c25a4bfa729c8b305f06e061f0497
60+ refs/heads/tswast-patch-1: b8923f4765277e8420d31ca2b88d312f8d58061d
6161refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b
Original file line number Diff line number Diff line change 3232import com .google .api .services .datastore .client .DatastoreException ;
3333import com .google .api .services .datastore .client .DatastoreFactory ;
3434import com .google .api .services .datastore .client .DatastoreOptions .Builder ;
35+ import com .google .common .base .Preconditions ;
3536import com .google .common .collect .ImmutableMap ;
3637import com .google .gcloud .datastore .DatastoreOptions ;
3738import com .google .gcloud .spi .DatastoreRpc .DatastoreRpcException .Reason ;
@@ -78,12 +79,9 @@ public DefaultDatastoreRpc(DatastoreOptions options) {
7879 private static String normalizeHost (String host ) {
7980 host = host .toLowerCase ();
8081 if (includesScheme (host )) {
81- if (host .startsWith ("https://" ) && isLocalHost (host )) {
82- throw new IllegalArgumentException (
83- "\" https\" is not supported for localhost. Use \" http\" instead." );
84- } else {
85- return host ;
86- }
82+ Preconditions .checkArgument (!(host .startsWith ("https://" ) && isLocalHost (host )),
83+ "\" https\" is not supported for localhost. Use \" http\" instead." );
84+ return host ;
8785 }
8886 return "http://" + host ;
8987 }
You can’t perform that action at this time.
0 commit comments