mirror of https://github.com/grpc/grpc-java.git
api: Stabilize two io.grpc.Status methods (#10322)
This stabilizes: - Status.asRuntimeException(Metadata) - Status.trailersFromThrowable(Throwable)
This commit is contained in:
parent
3808e707f9
commit
3b40b22348
|
|
@ -418,7 +418,6 @@ public final class Status {
|
||||||
* @return the trailers or {@code null} if not found.
|
* @return the trailers or {@code null} if not found.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4683")
|
|
||||||
public static Metadata trailersFromThrowable(Throwable t) {
|
public static Metadata trailersFromThrowable(Throwable t) {
|
||||||
Throwable cause = checkNotNull(t, "t");
|
Throwable cause = checkNotNull(t, "t");
|
||||||
while (cause != null) {
|
while (cause != null) {
|
||||||
|
|
@ -534,7 +533,6 @@ public final class Status {
|
||||||
* Same as {@link #asRuntimeException()} but includes the provided trailers in the returned
|
* Same as {@link #asRuntimeException()} but includes the provided trailers in the returned
|
||||||
* exception.
|
* exception.
|
||||||
*/
|
*/
|
||||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4683")
|
|
||||||
public StatusRuntimeException asRuntimeException(@Nullable Metadata trailers) {
|
public StatusRuntimeException asRuntimeException(@Nullable Metadata trailers) {
|
||||||
return new StatusRuntimeException(this, trailers);
|
return new StatusRuntimeException(this, trailers);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue