You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2013/11/04 22:21:47 UTC
[2/2] git commit: THRIFT-2158 Compact, JSON,
and SimpleJSON protocols are not working correctly
THRIFT-2158 Compact, JSON, and SimpleJSON protocols are not working correctly
Patch: Jens Geyer
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/9957d302
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/9957d302
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/9957d302
Branch: refs/heads/master
Commit: 9957d3022e69e8e9b8921e297171f8903017694d
Parents: 31aebbe
Author: Jens Geyer <je...@apache.org>
Authored: Mon Nov 4 22:18:40 2013 +0100
Committer: Jens Geyer <je...@apache.org>
Committed: Mon Nov 4 22:18:40 2013 +0100
----------------------------------------------------------------------
lib/go/thrift/compact_protocol.go | 3 +--
lib/go/thrift/serializer_test.go | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/9957d302/lib/go/thrift/compact_protocol.go
----------------------------------------------------------------------
diff --git a/lib/go/thrift/compact_protocol.go b/lib/go/thrift/compact_protocol.go
index ba5f722..74d36d0 100644
--- a/lib/go/thrift/compact_protocol.go
+++ b/lib/go/thrift/compact_protocol.go
@@ -719,8 +719,7 @@ func (p *TCompactProtocol) getTType(t tCompactType) (TType, error) {
switch byte(t) & 0x0f {
case STOP:
return STOP, nil
- case COMPACT_BOOLEAN_FALSE:
- case COMPACT_BOOLEAN_TRUE:
+ case COMPACT_BOOLEAN_FALSE, COMPACT_BOOLEAN_TRUE:
return BOOL, nil
case COMPACT_BYTE:
return BYTE, nil
http://git-wip-us.apache.org/repos/asf/thrift/blob/9957d302/lib/go/thrift/serializer_test.go
----------------------------------------------------------------------
diff --git a/lib/go/thrift/serializer_test.go b/lib/go/thrift/serializer_test.go
index ca8fb0e..0f3f7d7 100644
--- a/lib/go/thrift/serializer_test.go
+++ b/lib/go/thrift/serializer_test.go
@@ -145,7 +145,7 @@ func TestSerializer(t *testing.T) {
var protocol_factories map[string]ProtocolFactory
protocol_factories = make(map[string]ProtocolFactory)
protocol_factories["Binary"] = NewTBinaryProtocolFactoryDefault()
-// protocol_factories["Compact"] = NewTCompactProtocolFactory() - not working right now, see THRIFT-2158
+ protocol_factories["Compact"] = NewTCompactProtocolFactory()
//protocol_factories["SimpleJSON"] = NewTSimpleJSONProtocolFactory() - write only, can't be read back by design
protocol_factories["JSON"] = NewTJSONProtocolFactory()