Thrift: Rename Status.CONTINUE to Status.CONT (reserved word), closes #415.
This commit is contained in:
parent
6314c2460c
commit
ee2fabb9dd
|
@ -23,7 +23,7 @@ struct RestRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Status {
|
enum Status {
|
||||||
CONTINUE = 100,
|
CONT = 100,
|
||||||
SWITCHING_PROTOCOLS = 101,
|
SWITCHING_PROTOCOLS = 101,
|
||||||
OK = 200,
|
OK = 200,
|
||||||
CREATED = 201,
|
CREATED = 201,
|
||||||
|
|
|
@ -9,7 +9,7 @@ package org.elasticsearch.thrift;
|
||||||
import org.apache.thrift.TEnum;
|
import org.apache.thrift.TEnum;
|
||||||
|
|
||||||
public enum Status implements TEnum {
|
public enum Status implements TEnum {
|
||||||
CONTINUE(100),
|
CONT(100),
|
||||||
SWITCHING_PROTOCOLS(101),
|
SWITCHING_PROTOCOLS(101),
|
||||||
OK(200),
|
OK(200),
|
||||||
CREATED(201),
|
CREATED(201),
|
||||||
|
@ -75,7 +75,7 @@ public enum Status implements TEnum {
|
||||||
public static Status findByValue(int value) {
|
public static Status findByValue(int value) {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 100:
|
case 100:
|
||||||
return CONTINUE;
|
return CONT;
|
||||||
case 101:
|
case 101:
|
||||||
return SWITCHING_PROTOCOLS;
|
return SWITCHING_PROTOCOLS;
|
||||||
case 200:
|
case 200:
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class ThriftRestImpl extends AbstractComponent implements Rest.Iface {
|
||||||
private Status getStatus(RestResponse.Status status) {
|
private Status getStatus(RestResponse.Status status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case CONTINUE:
|
case CONTINUE:
|
||||||
return Status.CONTINUE;
|
return Status.CONT;
|
||||||
case SWITCHING_PROTOCOLS:
|
case SWITCHING_PROTOCOLS:
|
||||||
return Status.SWITCHING_PROTOCOLS;
|
return Status.SWITCHING_PROTOCOLS;
|
||||||
case OK:
|
case OK:
|
||||||
|
|
Loading…
Reference in New Issue