Return a Status given a canonical error Code value.
(int codeValue)
| 302 | * Return a {@link Status} given a canonical error {@link Code} value. |
| 303 | */ |
| 304 | public static Status fromCodeValue(int codeValue) { |
| 305 | if (codeValue < 0 || codeValue >= STATUS_LIST.size()) { |
| 306 | return UNKNOWN.withDescription("Unknown code " + codeValue); |
| 307 | } else { |
| 308 | return STATUS_LIST.get(codeValue); |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | private static Status fromCodeValue(byte[] asciiCodeValue) { |
| 313 | if (asciiCodeValue.length == 1 && asciiCodeValue[0] == '0') { |