Skip to content

Commit 41f607d

Browse files
committed
Merge pull request #303 from aozarov/master
checkstyle fixes
2 parents e391e41 + 2bdb042 commit 41f607d

25 files changed

Lines changed: 165 additions & 156 deletions

File tree

gcloud-java-core/src/main/java/com/google/gcloud/RetryParams.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ public double getRetryDelayBackoffFactor() {
251251
}
252252

253253
/**
254-
* Returns the totalRetryPeriodMillis. Default value is {@value #DEFAULT_TOTAL_RETRY_PERIOD_MILLIS}.
254+
* Returns the totalRetryPeriodMillis. Default value is
255+
* {@value #DEFAULT_TOTAL_RETRY_PERIOD_MILLIS}.
255256
*/
256257
public long getTotalRetryPeriodMillis() {
257258
return totalRetryPeriodMillis;

gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
import java.util.regex.Pattern;
4949

5050
public abstract class ServiceOptions<
51-
ServiceT extends Service,
52-
ServiceRpcT,
53-
OptionsT extends ServiceOptions<ServiceT, ServiceRpcT, OptionsT>>
51+
ServiceT extends Service,
52+
ServiceRpcT,
53+
OptionsT extends ServiceOptions<ServiceT, ServiceRpcT, OptionsT>>
5454
implements Serializable {
5555

5656
private static final String DEFAULT_HOST = "https://www.googleapis.com";
@@ -116,9 +116,9 @@ public HttpTransport create() {
116116
* Implementations should implement {@code Serializable} wherever possible and must document
117117
* whether or not they do support serialization.
118118
*/
119-
public static abstract class Clock {
119+
public abstract static class Clock {
120120

121-
private static ServiceOptions.Clock DEFAULT_TIME_SOURCE = new DefaultClock();
121+
private static final ServiceOptions.Clock DEFAULT_TIME_SOURCE = new DefaultClock();
122122

123123
/**
124124
* Returns current time in milliseconds according to this clock.

gcloud-java-core/src/test/java/com/google/gcloud/ExceptionHandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
import com.google.gcloud.ExceptionHandler.Interceptor;
2424
import com.google.gcloud.ExceptionHandler.Interceptor.RetryResult;
2525

26-
import org.junit.rules.ExpectedException;
2726
import org.junit.Rule;
2827
import org.junit.Test;
28+
import org.junit.rules.ExpectedException;
2929

3030
import java.io.FileNotFoundException;
3131
import java.io.IOException;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
* A Google Cloud Datastore Blob.
3636
* This class is immutable.
3737
*
38-
* @see <a href="https://cloud.google.com/datastore/docs/concepts/entities">Google Cloud Datastore Entities, Properties, and Keys</a>
38+
* @see <a href="https://cloud.google.com/datastore/docs/concepts/entities">
39+
* Google Cloud Datastore Entities, Properties, and Keys</a>
3940
*/
4041
public final class Blob extends Serializable<DatastoreV1.Value> {
4142

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
* }
4848
* } </pre>
4949
*
50-
* @see <a href="https://cloud.google.com/datastore/docs/concepts/transactions">Google Cloud Datastore transactions</a>
50+
* @see <a href="https://cloud.google.com/datastore/docs/concepts/transactions">
51+
* Google Cloud Datastore transactions</a>
5152
*
5253
*/
5354
public interface Transaction extends DatastoreBatchWriter, DatastoreReaderWriter {

gcloud-java-datastore/src/test/java/com/google/gcloud/datastore/BaseKeyTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ public void testAncestors() throws Exception {
115115
BaseKey key = builder.build();
116116
assertTrue(key.ancestors().isEmpty());
117117
List<PathElement> path = new ArrayList<>();
118-
path.add(PathElement.of("p1","v1"));
118+
path.add(PathElement.of("p1", "v1"));
119119
key = builder.ancestors(path.get(0)).build();
120120
assertEquals(path, key.ancestors());
121-
path.add(PathElement.of("p2","v2"));
121+
path.add(PathElement.of("p2", "v2"));
122122
key = builder.ancestors(path.get(1)).build();
123123
assertEquals(path, key.ancestors());
124124
}

gcloud-java-datastore/src/test/java/com/google/gcloud/datastore/DatastoreTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ public void testNewBatch() {
346346

347347
@Test
348348
public void testRunGqlQueryNoCasting() {
349-
Query<Entity> query1 = Query.gqlQueryBuilder(ResultType.ENTITY, "select * from " + KIND1).build();
349+
Query<Entity> query1 =
350+
Query.gqlQueryBuilder(ResultType.ENTITY, "select * from " + KIND1).build();
350351
QueryResults<Entity> results1 = datastore.run(query1);
351352
assertTrue(results1.hasNext());
352353
assertEquals(ENTITY1, results1.next());

gcloud-java-datastore/src/test/java/com/google/gcloud/datastore/ListValueTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828

2929
public class ListValueTest {
3030

31-
private static final List<Value<?>> CONTENT = ImmutableList.of(NullValue.of(), StringValue.of("foo"));
31+
private static final List<Value<?>> CONTENT =
32+
ImmutableList.of(NullValue.of(), StringValue.of("foo"));
3233

3334
@Test
3435
public void testToBuilder() throws Exception {

gcloud-java-datastore/src/test/java/com/google/gcloud/datastore/SerializationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public class SerializationTest {
4848
private static final Key KEY2 = Key.builder(KEY1, "v", 2).build();
4949
private static final DateTime DATE_TIME1 = DateTime.now();
5050
private static final Blob BLOB1 = Blob.copyFrom(UTF_8.encode("hello world"));
51-
private static final Cursor CURSOR1 = Cursor.copyFrom(new byte[] {1,2});
52-
private static final Cursor CURSOR2 = Cursor.copyFrom(new byte[]{10});
51+
private static final Cursor CURSOR1 = Cursor.copyFrom(new byte[] {1, 2});
52+
private static final Cursor CURSOR2 = Cursor.copyFrom(new byte[] {10});
5353
private static final Query<?> GQL1 =
5454
Query.gqlQueryBuilder("select * from kind1 where name = @name and age > @1")
5555
.setBinding("name", "name1")

gcloud-java-datastore/src/test/java/com/google/gcloud/datastore/ValueTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public class ValueTest {
4242
private static final NullValue NULL_VALUE = NullValue.of();
4343
private static final StringValue STRING_VALUE = StringValue.of("hello");
4444
private static final RawValue RAW_VALUE = RawValue.of(STRING_VALUE.toPb());
45-
private static final ImmutableMap<ValueType, Object[]> TYPES = ImmutableMap.<ValueType, Object[]>builder()
45+
private static final ImmutableMap<ValueType, Object[]> TYPES =
46+
ImmutableMap.<ValueType, Object[]>builder()
4647
.put(ValueType.NULL, new Object[] {NullValue.class, NULL_VALUE.get()})
4748
.put(ValueType.KEY, new Object[] {KeyValue.class, KEY})
4849
.put(ValueType.BLOB, new Object[] {BlobValue.class, BLOB})
@@ -160,7 +161,7 @@ public void testIndexed() throws Exception {
160161
@SuppressWarnings("deprecation")
161162
@Test
162163
public void testHasMeaning() throws Exception {
163-
for (Value<?> value: typeToValue.values()) {
164+
for (Value<?> value : typeToValue.values()) {
164165
assertFalse(value.hasMeaning());
165166
}
166167

@@ -171,7 +172,7 @@ public void testHasMeaning() throws Exception {
171172
@SuppressWarnings("deprecation")
172173
@Test
173174
public void testMeaning() throws Exception {
174-
for (Value<?> value: typeToValue.values()) {
175+
for (Value<?> value : typeToValue.values()) {
175176
assertNull(value.meaning());
176177
}
177178

0 commit comments

Comments
 (0)