commit | 69336671788495cf6a7b6390a3a50c77501c51f2 | [log] [tgz] |
---|---|---|
author | simonma <simonma@google.com> | Tue Jun 24 11:40:37 2014 -0700 |
committer | Eric Anderson <ejona@google.com> | Thu Jan 08 14:42:26 2015 -0800 |
tree | d509a686ba4442d4597fd2cd9d28b400f7b07bd0 | |
parent | 56c1d8c24561dd4c71191bf7c1e8fa4a0af49d13 [diff] |
Sync with new error code. And when write the Code in the MessageFramer, write the field number instead of the index. ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=69868712
diff --git a/core/src/main/java/com/google/net/stubby/newtransport/MessageFramer.java b/core/src/main/java/com/google/net/stubby/newtransport/MessageFramer.java index f74b837..7a0502d 100644 --- a/core/src/main/java/com/google/net/stubby/newtransport/MessageFramer.java +++ b/core/src/main/java/com/google/net/stubby/newtransport/MessageFramer.java
@@ -132,7 +132,7 @@ @Override public void writeStatus(Status status) { - short code = (short) status.getCode().ordinal(); + short code = (short) status.getCode().getNumber(); scratch.clear(); scratch.put(GrpcFramingUtil.STATUS_FRAME); int length = 2;
diff --git a/core/src/main/java/com/google/net/stubby/transport/MessageFramer.java b/core/src/main/java/com/google/net/stubby/transport/MessageFramer.java index 057d7d6..1dce95c 100644 --- a/core/src/main/java/com/google/net/stubby/transport/MessageFramer.java +++ b/core/src/main/java/com/google/net/stubby/transport/MessageFramer.java
@@ -139,7 +139,7 @@ @Override public void writeStatus(Status status, boolean flush, Sink sink) { - short code = (short) status.getCode().ordinal(); + short code = (short) status.getCode().getNumber(); scratch.clear(); scratch.put(GrpcFramingUtil.STATUS_FRAME); int length = 2;