From ee86ee41a04143ed030127e3095257d990598f7d Mon Sep 17 00:00:00 2001 From: rocking Date: Tue, 23 Dec 2014 14:11:50 -0800 Subject: [PATCH] Nano proto and Proto3 do no include fields that have their default values in the wire format. Avoid using hasxxxx ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82743695 --- .../google/net/stubby/testing/integration/TestServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-testing/src/main/java/com/google/net/stubby/testing/integration/TestServiceImpl.java b/integration-testing/src/main/java/com/google/net/stubby/testing/integration/TestServiceImpl.java index fbd2afcaec..e1823603d8 100644 --- a/integration-testing/src/main/java/com/google/net/stubby/testing/integration/TestServiceImpl.java +++ b/integration-testing/src/main/java/com/google/net/stubby/testing/integration/TestServiceImpl.java @@ -90,7 +90,7 @@ public class TestServiceImpl implements TestServiceGrpc.TestService { public void unaryCall(SimpleRequest req, StreamObserver responseObserver) { SimpleResponse.Builder responseBuilder = SimpleResponse.newBuilder(); - if (req.hasResponseType() && req.hasResponseSize()) { + if (req.getResponseSize() != 0) { boolean compressable = compressableResponse(req.getResponseType()); ByteString dataBuffer = compressable ? compressableBuffer : uncompressableBuffer; // For consistency with the c++ TestServiceImpl, use a random offset for unary calls.