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

Context.Storage deprecated method attach() removed, doAttach() made abstract #10379

Merged
merged 1 commit into from
Jul 31, 2023
Merged
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
18 changes: 1 addition & 17 deletions api/src/context/java/io/grpc/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -999,16 +999,6 @@ public String toString() {
* subject to change.
*/
public abstract static class Storage {
/**
* Unused.
*
* @deprecated This is an old API that is no longer used.
*/
@Deprecated
public void attach(Context toAttach) {
throw new UnsupportedOperationException("Deprecated. Do not call.");
}

/**
* Implements {@link io.grpc.Context#attach}.
*
Expand All @@ -1022,13 +1012,7 @@ public void attach(Context toAttach) {
* as the {@code toRestore} parameter. {@code null} is a valid return value, but see
* caution note.
*/
public Context doAttach(Context toAttach) {
// This is a default implementation to help migrate existing Storage implementations that
// have an attach() method but no doAttach() method.
Context current = current();
attach(toAttach);
return current;
}
public abstract Context doAttach(Context toAttach);

/**
* Implements {@link io.grpc.Context#detach}.
Expand Down