Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress unchecked warning for defaultServiceFactory, defaultRpcFactory and toBuilder #881

Merged
merged 1 commit into from
Apr 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ protected Set<String> scopes() {
return SCOPES;
}

@SuppressWarnings("unchecked")
@Override
public Builder toBuilder() {
return new Builder(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,9 @@ private static <T> T newInstance(String className) throws IOException, ClassNotF
}
}

protected abstract <T extends ServiceFactory<ServiceT, OptionsT>> T defaultServiceFactory();
protected abstract ServiceFactory<ServiceT, OptionsT> defaultServiceFactory();

protected abstract <T extends ServiceRpcFactory<ServiceRpcT, OptionsT>> T defaultRpcFactory();
protected abstract ServiceRpcFactory<ServiceRpcT, OptionsT> defaultRpcFactory();

protected abstract Set<String> scopes();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,11 @@ protected String defaultProject() {
return projectId != null ? projectId : super.defaultProject();
}

@SuppressWarnings("unchecked")
@Override
protected DatastoreFactory defaultServiceFactory() {
return DefaultDatastoreFactory.INSTANCE;
}

@SuppressWarnings("unchecked")
@Override
protected DatastoreRpcFactory defaultRpcFactory() {
return DefaultDatastoreRpcFactory.INSTANCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,11 @@ private DnsOptions(Builder builder) {
super(DnsFactory.class, DnsRpcFactory.class, builder);
}

@SuppressWarnings("unchecked")
@Override
protected DnsFactory defaultServiceFactory() {
return DefaultDnsFactory.INSTANCE;
}

@SuppressWarnings("unchecked")
@Override
protected DnsRpcFactory defaultRpcFactory() {
return DefaultDnsRpcFactory.INSTANCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public int hashCode() {
return baseHashCode();
}

@SuppressWarnings("unchecked")
@Override
public Builder toBuilder() {
return new Builder(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,11 @@ private StorageOptions(Builder builder) {
super(StorageFactory.class, StorageRpcFactory.class, builder);
}

@SuppressWarnings("unchecked")
@Override
protected StorageFactory defaultServiceFactory() {
return DefaultStorageFactory.INSTANCE;
}

@SuppressWarnings("unchecked")
@Override
protected StorageRpcFactory defaultRpcFactory() {
return DefaultStorageRpcFactory.INSTANCE;
Expand Down