From a11d56f6855286acb454edb11378a6b20f42fd74 Mon Sep 17 00:00:00 2001 From: Igor Bernstein Date: Thu, 7 Nov 2024 15:18:41 -0500 Subject: [PATCH] chore: make server streaming transformer safer (#2405) Change-Id: I0fed7ea426a4b775a7fe5e661ed8e67f1faa53eb --- .../v2/stub/TransformingServerStreamingCallable.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/TransformingServerStreamingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/TransformingServerStreamingCallable.java index 576d8257d7..29b104965e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/TransformingServerStreamingCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/TransformingServerStreamingCallable.java @@ -46,24 +46,24 @@ public void call( inner.call( innerReq, - new ResponseObserver() { + new SafeResponseObserver(outerObserver) { @Override - public void onStart(StreamController streamController) { + public void onStartImpl(StreamController streamController) { outerObserver.onStart(streamController); } @Override - public void onResponse(InnerRespT innerResp) { + public void onResponseImpl(InnerRespT innerResp) { outerObserver.onResponse(responseTransformer.apply(innerResp)); } @Override - public void onError(Throwable throwable) { + public void onErrorImpl(Throwable throwable) { outerObserver.onError(throwable); } @Override - public void onComplete() { + public void onCompleteImpl() { outerObserver.onComplete(); } },