Skip to content

Commit c90e356

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 2549 b: refs/heads/update-datastore c: c36b857 h: refs/heads/master i: 2547: 7481ee5
1 parent 6e9ea5f commit c90e356

29 files changed

Lines changed: 59 additions & 45 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/gh-pages: 4e0561bb4504bf647db669a14417b2b2c87ba45d
55
refs/heads/bigquery: 762fa5830e6c398c0396177e3e7fd243bd62cfc3
66
refs/heads/pubsub-alpha: 1a0e970f265af871e02274085b9662b3fe29058b
77
refs/heads/resource-manager: ebf4adc5ee835cd2086c4ac5b4e78d01a5a005a7
8-
refs/heads/update-datastore: c9203879ea27b6b2df451b61f9e9cae7792970b8
8+
refs/heads/update-datastore: c36b857f7eabee5d069899195b613271a9c31332
99
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444
1010
refs/tags/v0.0.10: 207ebd2a3472fddee69fe1298eb90429e3306efd
1111
refs/tags/v0.0.11: ffbfba48a6426ff63c08ff2117e58681f251fbf2

branches/update-datastore/gcloud-java-core/src/main/java/com/google/gcloud/PageImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public PageImpl(NextPageFetcher<T> pageFetcher, String cursor, Iterable<T> resul
7171
this.results = results;
7272
}
7373

74+
@SuppressWarnings("unchecked")
7475
@Override
7576
public Iterable<T> values() {
7677
return results == null ? Collections.EMPTY_LIST : results;

branches/update-datastore/gcloud-java-core/src/main/java/com/google/gcloud/ServiceFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* Implementation must provide a public no-arg constructor.
2323
* Loading of a factory implementation is done via {@link java.util.ServiceLoader}.
2424
*/
25+
@SuppressWarnings("rawtypes")
2526
public interface ServiceFactory<ServiceT extends Service, ServiceOptionsT extends ServiceOptions> {
2627

2728
ServiceT create(ServiceOptionsT serviceOptions);

branches/update-datastore/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import java.util.regex.Matcher;
5454
import java.util.regex.Pattern;
5555

56+
@SuppressWarnings("rawtypes")
5657
public abstract class ServiceOptions<
5758
ServiceT extends Service,
5859
ServiceRpcT,
@@ -305,8 +306,8 @@ protected ServiceOptions(Class<? extends ServiceFactory<ServiceT, OptionsT>> ser
305306
if (projectIdRequired()) {
306307
checkArgument(
307308
projectId != null,
308-
"A project ID is required for this service but could not be determined from the builder or "
309-
+ "the environment. Please set a project ID using the builder.");
309+
"A project ID is required for this service but could not be determined from the builder "
310+
+ "or the environment. Please set a project ID using the builder.");
310311
}
311312
host = firstNonNull(builder.host, defaultHost());
312313
httpTransportFactory = firstNonNull(builder.httpTransportFactory,
@@ -453,13 +454,15 @@ protected static String getAppEngineProjectId() {
453454
}
454455
}
455456

457+
@SuppressWarnings("unchecked")
456458
public ServiceT service() {
457459
if (service == null) {
458460
service = serviceFactory.create((OptionsT) this);
459461
}
460462
return service;
461463
}
462464

465+
@SuppressWarnings("unchecked")
463466
public ServiceRpcT rpc() {
464467
if (rpc == null) {
465468
rpc = serviceRpcFactory.create((OptionsT) this);
@@ -587,6 +590,7 @@ private void readObject(ObjectInputStream input) throws IOException, ClassNotFou
587590
authCredentials = authCredentialsState != null ? authCredentialsState.restore() : null;
588591
}
589592

593+
@SuppressWarnings("unchecked")
590594
private static <T> T newInstance(String className) throws IOException, ClassNotFoundException {
591595
try {
592596
return (T) Class.forName(className).newInstance();

branches/update-datastore/gcloud-java-core/src/main/java/com/google/gcloud/spi/ServiceRpcFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* Implementation must provide a public no-arg constructor.
2525
* Loading of a factory implementation is done via {@link java.util.ServiceLoader}.
2626
*/
27+
@SuppressWarnings("rawtypes")
2728
public interface ServiceRpcFactory<ServiceRpcT, OptionsT extends ServiceOptions> {
2829

2930
ServiceRpcT create(OptionsT options);

branches/update-datastore/gcloud-java-core/src/test/java/com/google/gcloud/PageImplTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
import org.junit.Test;
2424

25-
import java.util.Collections;
26-
2725
public class PageImplTest {
2826

2927
private static final ImmutableList<String> VALUES = ImmutableList.of("1", "2");

branches/update-datastore/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/DatastoreException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ static DatastoreException translateAndThrow(DatastoreRpcException exception) {
146146
* @throws DatastoreException every time
147147
*/
148148
static DatastoreException throwInvalidRequest(String massage, Object... params) {
149-
throw new DatastoreException(DatastoreError.FAILED_PRECONDITION, String.format(massage, params));
149+
throw new DatastoreException(
150+
DatastoreError.FAILED_PRECONDITION, String.format(massage, params));
150151
}
151152

152153
static DatastoreException propagateUserException(Exception ex) {

branches/update-datastore/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/DatastoreOptions.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,13 @@ protected String defaultProject() {
157157
return projectId != null ? projectId : super.defaultProject();
158158
}
159159

160+
@SuppressWarnings("unchecked")
160161
@Override
161162
protected DatastoreFactory defaultServiceFactory() {
162163
return DefaultDatastoreFactory.INSTANCE;
163164
}
164165

166+
@SuppressWarnings("unchecked")
165167
@Override
166168
protected DatastoreRpcFactory defaultRpcFactory() {
167169
return DefaultDatastoreRpcFactory.INSTANCE;
@@ -199,6 +201,7 @@ protected Set<String> scopes() {
199201
return SCOPES;
200202
}
201203

204+
@SuppressWarnings("unchecked")
202205
@Override
203206
public Builder toBuilder() {
204207
return new Builder(this);

branches/update-datastore/gcloud-java-datastore/src/test/java/com/google/gcloud/datastore/DatastoreOptionsTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
import org.junit.Before;
3131
import org.junit.Test;
3232

33-
import java.io.IOException;
34-
3533
public class DatastoreOptionsTest {
3634

3735
private static final String PROJECT_ID = "project_id";
@@ -41,7 +39,7 @@ public class DatastoreOptionsTest {
4139
private DatastoreOptions.Builder options;
4240

4341
@Before
44-
public void setUp() throws IOException, InterruptedException {
42+
public void setUp() {
4543
datastoreRpcFactory = EasyMock.createMock(DatastoreRpcFactory.class);
4644
datastoreRpc = EasyMock.createMock(DatastoreRpc.class);
4745
options = DatastoreOptions.builder()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public static void beforeClass() throws IOException, InterruptedException {
121121
}
122122

123123
@Before
124-
public void setUp() throws IOException, InterruptedException {
124+
public void setUp() {
125125
options = DatastoreOptions.builder()
126126
.projectId(PROJECT_ID)
127127
.host("http://localhost:" + PORT)

0 commit comments

Comments
 (0)