File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
interop-testing/src/main/java/io/grpc/testing/integration Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1818
1919import static io .grpc .Grpc .TRANSPORT_ATTR_REMOTE_ADDR ;
2020import static io .grpc .testing .integration .TestCases .MCS_CS ;
21+ import static java .nio .charset .StandardCharsets .UTF_8 ;
2122
2223import com .google .common .base .Preconditions ;
2324import com .google .common .collect .Queues ;
@@ -242,9 +243,10 @@ public void onNext(StreamingOutputCallRequest request) {
242243 .asRuntimeException ());
243244 return ;
244245 }
245- if (new String (request .getPayload ().getBody ().toByteArray ()).equals (MCS_CS .description ())) {
246+ if (new String (request .getPayload ().getBody ().toByteArray (), UTF_8 )
247+ .equals (MCS_CS .description ())) {
246248 SocketAddress peerAddress = PEER_ADDRESS_CONTEXT_KEY .get ();
247- ByteString payload = ByteString .copyFrom (peerAddress .toString (). getBytes ());
249+ ByteString payload = ByteString .copyFromUtf8 (peerAddress .toString ());
248250 StreamingOutputCallResponse .Builder responseBuilder =
249251 StreamingOutputCallResponse .newBuilder ();
250252 responseBuilder .setPayload (
You can’t perform that action at this time.
0 commit comments