Skip to content

Commit 648672b

Browse files
committed
CR
1 parent 82e2bd5 commit 648672b

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

api/src/main/java/io/grpc/InternalStatus.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@ private InternalStatus() {}
3838
public static final Metadata.Key<Status> CODE_KEY = Status.CODE_KEY;
3939

4040
/**
41-
* Create a new {@link StatusRuntimeException} with the internal option of skipping the filling
42-
* of the stack trace.
41+
* Create a new {@link StatusRuntimeException} skipping the filling of the stack trace.
4342
*/
4443
@Internal
45-
public static StatusRuntimeException asRuntimeException(Status status,
44+
public static StatusRuntimeException asRuntimeExceptionWithoutStacktrace(Status status,
4645
@Nullable Metadata trailers) {
4746
return new InternalStatusRuntimeException(status, trailers);
4847
}

api/src/main/java/io/grpc/InternalStatusRuntimeException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* @see StatusRuntimeException
2727
*/
2828
class InternalStatusRuntimeException extends StatusRuntimeException {
29-
private static final long serialVersionUID = 5225396310618305864L;
29+
private static final long serialVersionUID = 0;
3030

3131
public InternalStatusRuntimeException(Status status, @Nullable Metadata trailers) {
3232
super(status, trailers);

core/src/main/java/io/grpc/internal/ServerCallImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ private void closedInternal(Status status) {
375375
listener.onCancel();
376376
// The status will not have a cause in all failure scenarios, but we want to make sure
377377
// we always cancel the context with one to keep the context cancelled state consistent.
378-
cancelCause = InternalStatus.asRuntimeException(
378+
cancelCause = InternalStatus.asRuntimeExceptionWithoutStacktrace(
379379
Status.CANCELLED.withDescription("RPC cancelled"), null);
380380
}
381381
} finally {

core/src/main/java/io/grpc/internal/ServerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ private void closedInternal(final Status status) {
887887
// failed status has an exception we will create one here if needed.
888888
Throwable cancelCause = status.getCause();
889889
if (cancelCause == null) {
890-
cancelCause = InternalStatus.asRuntimeException(
890+
cancelCause = InternalStatus.asRuntimeExceptionWithoutStacktrace(
891891
Status.CANCELLED.withDescription("RPC cancelled"), null);
892892
}
893893

0 commit comments

Comments
 (0)