Thrift: Rename Status.CONTINUE to Status.CONT (reserved word), closes #415.

This commit is contained in:
kimchy 2010-10-08 23:06:30 +02:00
parent 6314c2460c
commit ee2fabb9dd
3 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -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:

View File

@ -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: