Skip to content

Commit

Permalink
Suppress unchecked warning for defaultServiceFactory, defaultRpcFacto…
Browse files Browse the repository at this point in the history
…ry and toBuilder (#881)
  • Loading branch information
mziccard authored and aozarov committed Apr 8, 2016
1 parent 1eb3522 commit af18b50
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 8 deletions.
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

0 comments on commit af18b50

Please sign in to comment.