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

core: deprecate LoadBalancer.Helper#getNameResolverFactory #5418

Merged
merged 1 commit into from
Mar 4, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/src/main/java/io/grpc/LoadBalancer.java
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,11 @@ public ScheduledExecutorService getScheduledExecutorService() {
* Returns the NameResolver of the channel.
*
* @since 1.2.0
*
* @deprecated this method will be deleted in a future release. If you think it shouldn't be
* deleted, please file an issue on <a href="https://github.com/grpc/grpc-java">github</a>.
*/
@Deprecated
public abstract NameResolver.Factory getNameResolverFactory();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,7 @@ public String getAuthority() {
return ManagedChannelImpl.this.authority();
}

@Deprecated
@Override
public NameResolver.Factory getNameResolverFactory() {
return nameResolverFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public void runSerialized(Runnable task) {
delegate().runSerialized(task);
}

@Deprecated
@Override
public NameResolver.Factory getNameResolverFactory() {
return delegate().getNameResolverFactory();
Expand Down
4 changes: 3 additions & 1 deletion core/src/test/java/io/grpc/LoadBalancerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ public void updateBalancingState(
return null;
}

@Override public NameResolver.Factory getNameResolverFactory() {
@Deprecated
@Override
public NameResolver.Factory getNameResolverFactory() {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,7 @@ public ScheduledExecutorService getScheduledExecutorService() {
return clock.getScheduledExecutorService();
}

@Deprecated
@Override
public NameResolver.Factory getNameResolverFactory() {
throw new AssertionError("Should not be called");
Expand Down