Skip to content

Commit 5f7d381

Browse files
committed
Minor style fixes to Datastore
1 parent 49e2cd9 commit 5f7d381

File tree

9 files changed

+14
-12
lines changed

9 files changed

+14
-12
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import com.google.common.collect.ImmutableSortedMap;
3333
import com.google.common.collect.Maps;
3434

35+
import java.io.Serializable;
3536
import java.util.HashMap;
3637
import java.util.LinkedList;
3738
import java.util.List;
@@ -49,7 +50,7 @@
4950
* @see <a href="https://cloud.google.com/datastore/docs/concepts/entities">Google Cloud Datastore
5051
* Entities, Properties, and Keys</a>
5152
*/
52-
public abstract class BaseEntity<K extends IncompleteKey> implements java.io.Serializable {
53+
public abstract class BaseEntity<K extends IncompleteKey> implements Serializable {
5354

5455
private static final long serialVersionUID = -9070588108769487081L;
5556
private final ImmutableSortedMap<String, Value<?>> properties;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ interface DatastoreBatchWriter extends DatastoreWriter {
6060
/**
6161
* {@inheritDoc}
6262
* This operation will also remove from this batch any prior writes for entities with the same
63-
* keys
63+
* keys.
6464
*
6565
* @throws DatastoreException if not active
6666
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected List<Value<?>> getValue(com.google.datastore.v1.Value from) {
5757

5858
@Override
5959
protected void setValue(ListValue from, com.google.datastore.v1.Value.Builder to) {
60-
List<com.google.datastore.v1.Value> propertiesPb = new ArrayList<com.google.datastore.v1.Value>();
60+
List<com.google.datastore.v1.Value> propertiesPb = new ArrayList<>();
6161
for (Value<?> property : from.get()) {
6262
propertiesPb.add(property.toPb());
6363
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public String toString() {
7474
.add("name", name)
7575
.toString();
7676
}
77+
7778
@Override
7879
public int hashCode() {
7980
return Objects.hash(kind, id, name);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* A Google Cloud Datastore query.
3030
* For usage examples see {@link GqlQuery} and {@link StructuredQuery}.
3131
*
32-
* Note that queries require proper indexing. See
32+
* <p>Note that queries require proper indexing. See
3333
* <a href="https://cloud.google.com/datastore/docs/tools/indexconfig">
3434
* Cloud Datastore Index Configuration</a> for help configuring indexes.
3535
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ B mergeFrom(com.google.datastore.v1.Query queryPb) {
752752

753753
@Override
754754
public String toString() {
755-
return super.toStringHelper()
755+
return toStringHelper()
756756
.add("kind", kind)
757757
.add("startCursor", startCursor)
758758
.add("endCursor", endCursor)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public enum ValueType {
8181
RAW_VALUE(RawValue.MARSHALLER),
8282

8383
/**
84-
* Represents a {@link LatLng} value
84+
* Represents a {@link LatLng} value.
8585
*/
8686
LAT_LNG(LatLngValue.MARSHALLER);
8787

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ public DefaultDatastoreRpc(DatastoreOptions options) {
5353
} else if (!removeScheme(com.google.datastore.v1.client.DatastoreFactory.DEFAULT_HOST)
5454
.equals(removeScheme(normalizedHost))
5555
&& !normalizedHost.isEmpty()) {
56-
String fullURL = normalizedHost;
57-
if (fullURL.charAt(fullURL.length() - 1) != '/') {
58-
fullURL = fullURL + '/';
56+
String fullUrl = normalizedHost;
57+
if (fullUrl.charAt(fullUrl.length() - 1) != '/') {
58+
fullUrl = fullUrl + '/';
5959
}
60-
fullURL = fullURL
60+
fullUrl = fullUrl
6161
+ com.google.datastore.v1.client.DatastoreFactory.VERSION
6262
+ "/projects/"
6363
+ options.projectId();
64-
clientBuilder = clientBuilder.projectId(null).projectEndpoint(fullURL);
64+
clientBuilder = clientBuilder.projectId(null).projectEndpoint(fullUrl);
6565
}
6666
client = com.google.datastore.v1.client.DatastoreFactory.get()
6767
.create(clientBuilder.build());

google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ public static LocalDatastoreHelper create() {
623623
*
624624
* @throws InterruptedException if emulator-related tasks are interrupted
625625
* @throws IOException if there are socket exceptions or issues creating/deleting the temporary
626-
* data folder
626+
* data folder
627627
*/
628628
public void start() throws IOException, InterruptedException {
629629
// send a quick request in case we have a hanging process from a previous run

0 commit comments

Comments
 (0)