diff options
author | Nobuaki Sukegawa <nsuke@apache.org> | 2016-03-25 09:37:18 +0900 |
---|---|---|
committer | Nobuaki Sukegawa <nsuke@apache.org> | 2016-03-29 12:03:34 +0900 |
commit | eb344a81913234183bd5f4ab63a872ca165d308d (patch) | |
tree | c7853ac954196a1bf84a322d6d9913100eec241e | |
parent | f43d0ca6e57c4c30ea742e5f80e086288e999ecb (diff) | |
download | thrift-eb344a81913234183bd5f4ab63a872ca165d308d.tar.gz |
THRIFT-3762 Fix warnings for deprecated Thrift "byte" fields
This closes #967
-rw-r--r-- | test/DebugProtoTest.thrift | 52 | ||||
-rw-r--r-- | test/DocTest.thrift | 6 | ||||
-rw-r--r-- | test/StressTest.thrift | 8 | ||||
-rw-r--r-- | test/ThriftTest.thrift | 10 |
4 files changed, 38 insertions, 38 deletions
diff --git a/test/DebugProtoTest.thrift b/test/DebugProtoTest.thrift index df0fb3086..b6a765951 100644 --- a/test/DebugProtoTest.thrift +++ b/test/DebugProtoTest.thrift @@ -36,7 +36,7 @@ struct Doubles { struct OneOfEach { 1: bool im_true, 2: bool im_false, - 3: byte a_bite = 0x7f, + 3: i8 a_bite = 0x7f, 4: i16 integer16 = 0x7fff, 5: i32 integer32, 6: i64 integer64 = 10000000000, @@ -45,7 +45,7 @@ struct OneOfEach { 9: string zomg_unicode, 10: bool what_who, 11: binary base64, - 12: list<byte> byte_list = [1, 2, 3], + 12: list<i8> byte_list = [1, 2, 3], 13: list<i16> i16_list = [1,2,3], 14: list<i64> i64_list = [1,2,3] } @@ -105,7 +105,7 @@ struct Base64 { struct CompactProtoTestStruct { // primitive fields - 1: byte a_byte; + 1: i8 a_byte; 2: i16 a_i16; 3: i32 a_i32; 4: i64 a_i64; @@ -117,7 +117,7 @@ struct CompactProtoTestStruct { 10: Empty empty_struct_field; // primitives in lists - 11: list<byte> byte_list; + 11: list<i8> byte_list; 12: list<i16> i16_list; 13: list<i32> i32_list; 14: list<i64> i64_list; @@ -128,7 +128,7 @@ struct CompactProtoTestStruct { 19: list<Empty> struct_list; // primitives in sets - 20: set<byte> byte_set; + 20: set<i8> byte_set; 21: set<i16> i16_set; 22: set<i32> i32_set; 23: set<i64> i64_set; @@ -140,30 +140,30 @@ struct CompactProtoTestStruct { // maps // primitives as keys - 29: map<byte, byte> byte_byte_map; - 30: map<i16, byte> i16_byte_map; - 31: map<i32, byte> i32_byte_map; - 32: map<i64, byte> i64_byte_map; - 33: map<double, byte> double_byte_map; - 34: map<string, byte> string_byte_map; - 35: map<binary, byte> binary_byte_map; - 36: map<bool, byte> boolean_byte_map; + 29: map<i8, i8> byte_byte_map; + 30: map<i16, i8> i16_byte_map; + 31: map<i32, i8> i32_byte_map; + 32: map<i64, i8> i64_byte_map; + 33: map<double, i8> double_byte_map; + 34: map<string, i8> string_byte_map; + 35: map<binary, i8> binary_byte_map; + 36: map<bool, i8> boolean_byte_map; // primitives as values - 37: map<byte, i16> byte_i16_map; - 38: map<byte, i32> byte_i32_map; - 39: map<byte, i64> byte_i64_map; - 40: map<byte, double> byte_double_map; - 41: map<byte, string> byte_string_map; - 42: map<byte, binary> byte_binary_map; - 43: map<byte, bool> byte_boolean_map; + 37: map<i8, i16> byte_i16_map; + 38: map<i8, i32> byte_i32_map; + 39: map<i8, i64> byte_i64_map; + 40: map<i8, double> byte_double_map; + 41: map<i8, string> byte_string_map; + 42: map<i8, binary> byte_binary_map; + 43: map<i8, bool> byte_boolean_map; // collections as keys - 44: map<list<byte> (python.immutable = ""), byte> list_byte_map; - 45: map<set<byte> (python.immutable = ""), byte> set_byte_map; - 46: map<map<byte,byte> (python.immutable = ""), byte> map_byte_map; + 44: map<list<i8> (python.immutable = ""), i8> list_byte_map; + 45: map<set<i8> (python.immutable = ""), i8> set_byte_map; + 46: map<map<i8,i8> (python.immutable = ""), i8> map_byte_map; // collections as values - 47: map<byte, map<byte,byte>> byte_map_map; - 48: map<byte, set<byte>> byte_set_map; - 49: map<byte, list<byte>> byte_list_map; + 47: map<i8, map<i8,i8>> byte_map_map; + 48: map<i8, set<i8>> byte_set_map; + 49: map<i8, list<i8>> byte_list_map; } // To be used to test the serialization of an empty map diff --git a/test/DocTest.thrift b/test/DocTest.thrift index 70575c114..d702b2c23 100644 --- a/test/DocTest.thrift +++ b/test/DocTest.thrift @@ -58,7 +58,7 @@ struct Xtruct 1: string string_thing /** doct text goes before a comma */ - 4: byte byte_thing, + 4: i8 byte_thing, 9: i32 i32_thing, 11: i64 i64_thing @@ -74,7 +74,7 @@ const map<string,string> MAPCONSTANT = {'hello':'world', 'goodnight':'moon'} struct Xtruct2 { - 1: byte byte_thing, + 1: i8 byte_thing, 2: Xtruct struct_thing, 3: i32 i32_thing } @@ -117,7 +117,7 @@ service ThriftTest /** And this is how you would document functions in a service */ void testVoid(), string testString(1: string thing), - byte testByte(1: byte thing), + i8 testByte(1: byte thing), i32 testI32(1: i32 thing), /** Like this one */ diff --git a/test/StressTest.thrift b/test/StressTest.thrift index ccf22aff5..431811b87 100644 --- a/test/StressTest.thrift +++ b/test/StressTest.thrift @@ -24,12 +24,12 @@ namespace go stress service Service { void echoVoid(), - byte echoByte(1: byte arg), + i8 echoByte(1: i8 arg), i32 echoI32(1: i32 arg), i64 echoI64(1: i64 arg), string echoString(1: string arg), - list<byte> echoList(1: list<byte> arg), - set<byte> echoSet(1: set<byte> arg), - map<byte, byte> echoMap(1: map<byte, byte> arg), + list<i8> echoList(1: list<i8> arg), + set<i8> echoSet(1: set<i8> arg), + map<i8, i8> echoMap(1: map<i8, i8> arg), } diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift index 20929d46b..56adf3971 100644 --- a/test/ThriftTest.thrift +++ b/test/ThriftTest.thrift @@ -80,7 +80,7 @@ struct Bools { struct Xtruct { 1: string string_thing, - 4: byte byte_thing, + 4: i8 byte_thing, 9: i32 i32_thing, 11: i64 i64_thing } @@ -158,7 +158,7 @@ service ThriftTest * @param byte thing - the i8/byte to print * @return i8 - returns the i8/byte 'thing' */ - i8 testByte(1: byte thing), + i8 testByte(1: i8 thing), /** * Prints 'testI32("%d")' with thing as '%d' @@ -271,7 +271,7 @@ service ThriftTest /** * Prints 'testMulti()' - * @param byte arg0 - + * @param i8 arg0 - * @param i32 arg1 - * @param i64 arg2 - * @param map<i16, string> arg3 - @@ -280,7 +280,7 @@ service ThriftTest * @return Xtruct - returns an Xtruct with string_thing = "Hello2, byte_thing = arg0, i32_thing = arg1 * and i64_thing = arg2 */ - Xtruct testMulti(1: byte arg0, 2: i32 arg1, 3: i64 arg2, 4: map<i16, string> arg3, 5: Numberz arg4, 6: UserId arg5), + Xtruct testMulti(1: i8 arg0, 2: i32 arg1, 3: i64 arg2, 4: map<i16, string> arg3, 5: Numberz arg4, 6: UserId arg5), /** * Print 'testException(%s)' with arg as '%s' @@ -331,7 +331,7 @@ struct VersioningTestV2 { 1: i32 begin_in_both, 2: i32 newint, - 3: byte newbyte, + 3: i8 newbyte, 4: i16 newshort, 5: i64 newlong, 6: double newdouble |