This adds an Automatic-Module-Name entry to the Thrift jar manifest
in order to provide Thrift with a stable module name when used in a
JPMS modular context. The name chosen here is "org.apache.thrift",
which matches the symbolic name used for OSGi.
See: http://branchandbound.net/blog/java/2017/12/automatic-module-name/
This also comes from the discussion of
https://github.com/apache/thrift/pull/1992#issuecomment-705903922.
I think TDebugProtocol is a better fit for this feature than creating a
new TProtocol implementation.
The DuplicateTo field is not added to TDebugProtocolFactory because I
don't think it makes sense from the factory setup. In vast majority
cases users would need direct access to the underlying TMemoryBuffer to
make it useful, which is easier this way than an additional
TTransportFactory plus TProtocolFactory to make TDebugProtocolFactory
way too complicated.
Client: go
In go library's TSimpleJSONProtocol and TJSONProtocol implementations,
we use slices as stacks for context info, but didn't do proper boundary
check when peeking/popping, result in it might panic with using -1 as
slice index in certain cases of calling Write*End without matching
Write*Begin before.
Refactor the code to properly implement the stack, and return a
TProtocolException instead on those cases.
Also add unit tests for all protocols. The unit tests shown that
TCompactProtocol.[Read|Write]StructEnd would also panic with unmatched
Begin calls, so fix them as well.
Client: go
This is a follow up to 4db7a0af13.
Because of the Go runtime bug [1], the previous default value of 1ms is
not a great default as it could cause excessive cpu usage. Use 5ms
instead as a balance between being useful and not causing too much cpu
overhead.
It's still configurable.
[1]: https://github.com/golang/go/issues/27707
Client: php
Patch: Das Dedipyaman
This closes#2245
Update field access for getters_setters flag. FFields are private if getters_setters are set, otherwise, public.
Client: go
Cleanup the default NewTSerializer and NewTDeserializer implementations
to save an unnecessary allocation, and provide
NewTSerializerPoolSizeFactory and NewTDeserializerPoolSizeFactory for
easier non-default pool usages.
For the abstract unix socket address type, the string in the
'sun_path' field of the 'sockaddr_un' struct, is a not null-terminated
string (see unix(7)).
Fix the lentgh calculation of the 'sun_path' field to not add
the termination null byte.
Generated python files have a blank line at the end of files, except for
service files where there are two blank lines, this change makes these
service files consistent.
This change is trivial and thus does not require a ticket.
Client: lua
Patch: longzhiri <persistentsnail@gmail.com>
This closes#2212
The oneway method's processor has no need to write the result to client, but it is necessary to return values of each handler's return.