Skip to content

Commit 59b8508

Browse files
committed
Fix formatting
1 parent 419ce3b commit 59b8508

File tree

7 files changed

+931
-926
lines changed

7 files changed

+931
-926
lines changed

google-cloud-datastore-utils/src/main/java/com/google/datastore/utils/Datastore.java

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import com.google.datastore.v1.*;
1919
import com.google.rpc.Code;
20-
2120
import java.io.IOException;
2221
import java.io.InputStream;
2322

@@ -47,12 +46,14 @@ public int getRpcCount() {
4746
return remoteRpc.getRpcCount();
4847
}
4948

50-
private com.google.datastore.utils.DatastoreException invalidResponseException(String method, IOException exception) {
49+
private com.google.datastore.utils.DatastoreException invalidResponseException(
50+
String method, IOException exception) {
5151
return RemoteRpc.makeException(
5252
remoteRpc.getUrl(), method, Code.UNAVAILABLE, "Invalid response", exception);
5353
}
5454

55-
public AllocateIdsResponse allocateIds(AllocateIdsRequest request) throws com.google.datastore.utils.DatastoreException {
55+
public AllocateIdsResponse allocateIds(AllocateIdsRequest request)
56+
throws com.google.datastore.utils.DatastoreException {
5657
try (InputStream is =
5758
remoteRpc.call("allocateIds", request, request.getProjectId(), request.getDatabaseId())) {
5859
return AllocateIdsResponse.parseFrom(is);
@@ -72,7 +73,8 @@ public BeginTransactionResponse beginTransaction(BeginTransactionRequest request
7273
}
7374
}
7475

75-
public CommitResponse commit(CommitRequest request) throws com.google.datastore.utils.DatastoreException {
76+
public CommitResponse commit(CommitRequest request)
77+
throws com.google.datastore.utils.DatastoreException {
7678
try (InputStream is =
7779
remoteRpc.call("commit", request, request.getProjectId(), request.getDatabaseId())) {
7880
return CommitResponse.parseFrom(is);
@@ -81,7 +83,8 @@ public CommitResponse commit(CommitRequest request) throws com.google.datastore.
8183
}
8284
}
8385

84-
public LookupResponse lookup(LookupRequest request) throws com.google.datastore.utils.DatastoreException {
86+
public LookupResponse lookup(LookupRequest request)
87+
throws com.google.datastore.utils.DatastoreException {
8588
try (InputStream is =
8689
remoteRpc.call("lookup", request, request.getProjectId(), request.getDatabaseId())) {
8790
return LookupResponse.parseFrom(is);
@@ -90,7 +93,8 @@ public LookupResponse lookup(LookupRequest request) throws com.google.datastore.
9093
}
9194
}
9295

93-
public ReserveIdsResponse reserveIds(ReserveIdsRequest request) throws com.google.datastore.utils.DatastoreException {
96+
public ReserveIdsResponse reserveIds(ReserveIdsRequest request)
97+
throws com.google.datastore.utils.DatastoreException {
9498
try (InputStream is =
9599
remoteRpc.call("reserveIds", request, request.getProjectId(), request.getDatabaseId())) {
96100
return ReserveIdsResponse.parseFrom(is);
@@ -99,7 +103,8 @@ public ReserveIdsResponse reserveIds(ReserveIdsRequest request) throws com.googl
99103
}
100104
}
101105

102-
public RollbackResponse rollback(RollbackRequest request) throws com.google.datastore.utils.DatastoreException {
106+
public RollbackResponse rollback(RollbackRequest request)
107+
throws com.google.datastore.utils.DatastoreException {
103108
try (InputStream is =
104109
remoteRpc.call("rollback", request, request.getProjectId(), request.getDatabaseId())) {
105110
return RollbackResponse.parseFrom(is);
@@ -108,7 +113,8 @@ public RollbackResponse rollback(RollbackRequest request) throws com.google.data
108113
}
109114
}
110115

111-
public RunQueryResponse runQuery(RunQueryRequest request) throws com.google.datastore.utils.DatastoreException {
116+
public RunQueryResponse runQuery(RunQueryRequest request)
117+
throws com.google.datastore.utils.DatastoreException {
112118
try (InputStream is =
113119
remoteRpc.call("runQuery", request, request.getProjectId(), request.getDatabaseId())) {
114120
return RunQueryResponse.parseFrom(is);

google-cloud-datastore-utils/src/main/java/com/google/datastore/utils/DatastoreFactory.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,17 @@
1515
*/
1616
package com.google.datastore.utils;
1717

18+
import static com.google.common.base.Preconditions.checkNotNull;
19+
1820
import com.google.api.client.auth.oauth2.Credential;
1921
import com.google.api.client.http.HttpRequestFactory;
2022
import com.google.api.client.http.HttpTransport;
2123
import com.google.api.client.http.javanet.NetHttpTransport;
22-
2324
import java.net.URI;
2425
import java.net.URISyntaxException;
2526
import java.util.Arrays;
2627
import java.util.logging.*;
2728

28-
import static com.google.common.base.Preconditions.checkNotNull;
29-
3029
/** Client factory for {@link com.google.datastore.utils.Datastore}. */
3130
public class DatastoreFactory {
3231

@@ -52,7 +51,8 @@ public static DatastoreFactory get() {
5251
*
5352
* @throws IllegalArgumentException if the server or credentials weren't provided.
5453
*/
55-
public com.google.datastore.utils.Datastore create(com.google.datastore.utils.DatastoreOptions options) {
54+
public com.google.datastore.utils.Datastore create(
55+
com.google.datastore.utils.DatastoreOptions options) {
5656
return new com.google.datastore.utils.Datastore(newRemoteRpc(options));
5757
}
5858

@@ -96,7 +96,8 @@ String buildProjectEndpoint(com.google.datastore.utils.DatastoreOptions options)
9696
protected com.google.datastore.utils.RemoteRpc newRemoteRpc(DatastoreOptions options) {
9797
checkNotNull(options);
9898
HttpRequestFactory client = makeClient(options);
99-
return new com.google.datastore.utils.RemoteRpc(client, options.getInitializer(), buildProjectEndpoint(options));
99+
return new com.google.datastore.utils.RemoteRpc(
100+
client, options.getInitializer(), buildProjectEndpoint(options));
100101
}
101102

102103
private static String validateUrl(String url) {

0 commit comments

Comments
 (0)