Github user WireBaron commented on a diff in the pull request:

    https://github.com/apache/geode/pull/700#discussion_r132591361
  
    --- Diff: 
geode-protobuf/src/main/java/org/apache/geode/protocol/protobuf/operations/GetAllRequestOperationHandler.java
 ---
    @@ -59,13 +59,14 @@
           }
           return 
Success.of(RegionAPI.GetAllResponse.newBuilder().addAllEntries(entries).build());
         } catch (UnsupportedEncodingTypeException ex) {
    -      return Failure.of(BasicTypes.ErrorResponse.newBuilder()
    -          .setErrorCode(ProtocolErrorCode.VALUE_ENCODING_ERROR.codeValue)
    -          .setMessage("Encoding not supported.").build());
    +      int errorCode = ProtocolErrorCode.VALUE_ENCODING_ERROR.codeValue;
    +      String message = "Encoding not supported.";
    +      return 
Failure.of(ProtobufResponseUtilities.makeErrorResponse(errorCode, message));
    --- End diff --
    
    Having a local variable for the error code and message or inlining them are 
both fine approaches, but it's a bit jarring to see both approaches used in two 
adjacent code blocks.  Please use a consistent approach.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to