mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 10:48:51 +00:00
THRIFT-260. rb: Some Protocol methods shouldn't have default nil implementations
This patch makes most of the methods in Thrift::Protocol throw NotImplementedExceptions. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756293 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1f804a80c2
commit
ae0631a844
@ -43,121 +43,175 @@ module Thrift
|
||||
false
|
||||
end
|
||||
|
||||
def write_message_begin(name, type, seqid); nil; end
|
||||
def write_message_begin(name, type, seqid)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeMessageBegin => :write_message_begin
|
||||
|
||||
def write_message_end; nil; end
|
||||
deprecate! :writeMessageEnd => :write_message_end
|
||||
|
||||
def write_struct_begin(name); nil; end
|
||||
def write_struct_begin(name)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeStructBegin => :write_struct_begin
|
||||
|
||||
def write_struct_end; nil; end
|
||||
deprecate! :writeStructEnd => :write_struct_end
|
||||
|
||||
def write_field_begin(name, type, id); nil; end
|
||||
def write_field_begin(name, type, id)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeFieldBegin => :write_field_begin
|
||||
|
||||
def write_field_end; nil; end
|
||||
deprecate! :writeFieldEnd => :write_field_end
|
||||
|
||||
def write_field_stop; nil; end
|
||||
def write_field_stop
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeFieldStop => :write_field_stop
|
||||
|
||||
def write_map_begin(ktype, vtype, size); nil; end
|
||||
def write_map_begin(ktype, vtype, size)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeMapBegin => :write_map_begin
|
||||
|
||||
def write_map_end; nil; end
|
||||
deprecate! :writeMapEnd => :write_map_end
|
||||
|
||||
def write_list_begin(etype, size); nil; end
|
||||
def write_list_begin(etype, size)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeListBegin => :write_list_begin
|
||||
|
||||
def write_list_end; nil; end
|
||||
deprecate! :writeListEnd => :write_list_end
|
||||
|
||||
def write_set_begin(etype, size); nil; end
|
||||
def write_set_begin(etype, size)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeSetBegin => :write_set_begin
|
||||
|
||||
def write_set_end; nil; end
|
||||
deprecate! :writeSetEnd => :write_set_end
|
||||
|
||||
def write_bool(bool); nil; end
|
||||
def write_bool(bool)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeBool => :write_bool
|
||||
|
||||
def write_byte(byte); nil; end
|
||||
def write_byte(byte)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeByte => :write_byte
|
||||
|
||||
def write_i16(i16); nil; end
|
||||
def write_i16(i16)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeI16 => :write_i16
|
||||
|
||||
def write_i32(i32); nil; end
|
||||
def write_i32(i32)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeI32 => :write_i32
|
||||
|
||||
def write_i64(i64); nil; end
|
||||
def write_i64(i64)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeI64 => :write_i64
|
||||
|
||||
def write_double(dub); nil; end
|
||||
def write_double(dub)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeDouble => :write_double
|
||||
|
||||
def write_string(str); nil; end
|
||||
def write_string(str)
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :writeString => :write_string
|
||||
|
||||
def read_message_begin; nil; end
|
||||
def read_message_begin
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readMessageBegin => :read_message_begin
|
||||
|
||||
def read_message_end; nil; end
|
||||
deprecate! :readMessageEnd => :read_message_end
|
||||
|
||||
def read_struct_begin; nil; end
|
||||
def read_struct_begin
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readStructBegin => :read_struct_begin
|
||||
|
||||
def read_struct_end; nil; end
|
||||
deprecate! :readStructEnd => :read_struct_end
|
||||
|
||||
def read_field_begin; nil; end
|
||||
def read_field_begin
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readFieldBegin => :read_field_begin
|
||||
|
||||
def read_field_end; nil; end
|
||||
deprecate! :readFieldEnd => :read_field_end
|
||||
|
||||
def read_map_begin; nil; end
|
||||
def read_map_begin
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readMapBegin => :read_map_begin
|
||||
|
||||
def read_map_end; nil; end
|
||||
deprecate! :readMapEnd => :read_map_end
|
||||
|
||||
def read_list_begin; nil; end
|
||||
def read_list_begin
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readListBegin => :read_list_begin
|
||||
|
||||
def read_list_end; nil; end
|
||||
deprecate! :readListEnd => :read_list_end
|
||||
|
||||
def read_set_begin; nil; end
|
||||
def read_set_begin
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readSetBegin => :read_set_begin
|
||||
|
||||
def read_set_end; nil; end
|
||||
deprecate! :readSetEnd => :read_set_end
|
||||
|
||||
def read_bool; nil; end
|
||||
def read_bool
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readBool => :read_bool
|
||||
|
||||
def read_byte; nil; end
|
||||
def read_byte
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readByte => :read_byte
|
||||
|
||||
def read_i16; nil; end
|
||||
def read_i16
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readI16 => :read_i16
|
||||
|
||||
def read_i32; nil; end
|
||||
def read_i32
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readI32 => :read_i32
|
||||
|
||||
def read_i64; nil; end
|
||||
def read_i64
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readI64 => :read_i64
|
||||
|
||||
def read_double; nil; end
|
||||
def read_double
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readDouble => :read_double
|
||||
|
||||
def read_string; nil; end
|
||||
def read_string
|
||||
raise NotImplementedError
|
||||
end
|
||||
deprecate! :readString => :read_string
|
||||
|
||||
def write_field(name, type, fid, value)
|
||||
|
Loading…
Reference in New Issue
Block a user