We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db68b69 commit 9dbade4Copy full SHA for 9dbade4
core/src/main/java/io/grpc/Status.java
@@ -319,6 +319,13 @@ public static Status fromCodeValue(int codeValue) {
319
320
@SuppressWarnings("fallthrough")
321
private static Status fromCodeValue(byte[] asciiCodeValue) {
322
+ if (asciiCodeValue.length == 1 && asciiCodeValue[0] == '0') {
323
+ return Status.OK;
324
+ }
325
+ return fromCodeValueSlow(asciiCodeValue);
326
327
+
328
+ private static Status fromCodeValueSlow(byte[] asciiCodeValue) {
329
int index = 0;
330
int codeValue = 0;
331
switch (asciiCodeValue.length) {
0 commit comments