Bryan Duxbury
15e2930ccf
THRIFT-761. java: Include the symbolic name of a typedef field in the field metadata
...
This patch adds a new isTypedef() method to FieldValueMetaData and converts MetaDataTest to a testcase in TestStruct.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@936588 13f79535-47bb-0310-9956-ffa450edef68
2010-04-22 01:05:02 +00:00
Bryan Duxbury
505b4c1e98
java: stop trying to run the removed UnionTest
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@936582 13f79535-47bb-0310-9956-ffa450edef68
2010-04-22 00:26:41 +00:00
Bryan Duxbury
0fab12e968
THRIFT-759. java: Make TBase implement Comparable
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@936581 13f79535-47bb-0310-9956-ffa450edef68
2010-04-22 00:22:34 +00:00
Bryan Duxbury
3292b3fed9
java: convert UnionTest to TestTUnion using JUnit
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@934300 13f79535-47bb-0310-9956-ffa450edef68
2010-04-15 07:01:51 +00:00
Bryan Duxbury
33da643220
THRIFT-754. java: Improvements to varint reading in Compact Protocol
...
This patch makes readVarint32 about 30% faster and readVarint64 about 25% faster (when using transports that support direct buffer access).
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@930898 13f79535-47bb-0310-9956-ffa450edef68
2010-04-05 16:28:21 +00:00
Bryan Duxbury
b1f7f7973b
THRIFT-746. java: Generated services Iface/Client inner classes do not derive from base classes
...
This patch causes all generated Client classes to inherit from TServiceClient, an interface that provides a way to get the protocols the Client is using. Also, it causes a new TServiceClientFactory implementation to generated for each Service, which provides a generic, reflection-free way to get Clients. These changes make it easier to build generic pools of Client objects.
Patch: Mathias Herberts
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@930601 13f79535-47bb-0310-9956-ffa450edef68
2010-04-03 23:19:52 +00:00
Bryan Duxbury
88569a25d1
THRIFT-752. java: Use a faster Stack implementation in TCompactProtocol
...
This patch adds ShortStack, an internal implementation of Stack that works directly on primitive short objects, and makes TCompactProtocol use this. A brief performance test shows that this makes serialization about 8% faster and deserialization about 15% faster, though the actual gain you see will be dependent on the nature of your structs - the more levels, the more gain.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@930593 13f79535-47bb-0310-9956-ffa450edef68
2010-04-03 22:52:03 +00:00
Bryan Duxbury
75526c999e
java: Enhance TMemoryInputTransport to allow operation on specific range of a buffer rather than the whole thing. This will allow us to avoid making array copies in some instances.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@930574 13f79535-47bb-0310-9956-ffa450edef68
2010-04-03 20:25:04 +00:00
Bryan Duxbury
c81a10a432
java: add a basic test for TMemoryInputTransport
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@930568 13f79535-47bb-0310-9956-ffa450edef68
2010-04-03 19:45:20 +00:00
Bryan Duxbury
c5de56cdfd
java: reorganize ProtocolTestBase slightly
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@930530 13f79535-47bb-0310-9956-ffa450edef68
2010-04-03 15:18:47 +00:00
Bryan Duxbury
5557beffae
THRIFT-723: java: Thrift buffers with set and map types in Java should implement Comparable
...
This makes structs that contain sets and maps in their hierarchy Comparable.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@928944 13f79535-47bb-0310-9956-ffa450edef68
2010-03-29 23:57:09 +00:00
Bryan Duxbury
b35240f4d5
java: Make TProtocolFactory extend Serializable.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@928901 13f79535-47bb-0310-9956-ffa450edef68
2010-03-29 21:12:10 +00:00
Bryan Duxbury
547edc7ae0
THRIFT-363. java: Maven Deploy
...
This commit adds changes to build.xml so that we can generate a POM file and publish the artifact to the Apache Maven repo. For now, we haven't published yet - we'll do that at the next release.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@928494 13f79535-47bb-0310-9956-ffa450edef68
2010-03-28 21:02:38 +00:00
Bryan Duxbury
e5e5c7b9d2
java: Move contents of CompareTest into TestStruct; delete old version
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@928159 13f79535-47bb-0310-9956-ffa450edef68
2010-03-27 06:24:12 +00:00
Bryan Duxbury
981869c6ac
java: Move contents of DeepCopyTest to TestStruct; delete old version
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@928157 13f79535-47bb-0310-9956-ffa450edef68
2010-03-27 06:13:09 +00:00
Bryan Duxbury
c23e09e7b0
java: Move contents of IdentityTest into TestStruct
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@928153 13f79535-47bb-0310-9956-ffa450edef68
2010-03-27 05:56:26 +00:00
Bryan Duxbury
d10f2bb480
java: get rid of old OverloadNonblockingServer.java (since it's not actually a test), move Fixtures up to o.a.thrift
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@928103 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 23:45:41 +00:00
Bryan Duxbury
dffa072afc
java: convert PartialDeserializeTest to testcase of TestTDeserializer (new junit test); add apache header to a few of the new test files.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@928101 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 23:38:23 +00:00
Bryan Duxbury
dd6dc838d9
java: convert Framed Transport test to JUnit, remove old version of test
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@928100 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 23:30:35 +00:00
Bryan Duxbury
bf0595fcb8
java: Convert TJSONProtocol test to JUnit, making a few minor changes to ProtocolTestBase in the process.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@927967 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 16:59:46 +00:00
Bryan Duxbury
61a1ad4d9d
java: Stop trying to run the deprecated version of binary and compact protocol tests, since they don't exist anymore
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@927701 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 05:59:59 +00:00
Bryan Duxbury
98c45872f9
java: Convert Binary and Compact protocol tests to JUnit
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@927699 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 05:58:34 +00:00
Bryan Duxbury
5af1b97173
THRIFT-719. java: Update Nonblocking and HsHa server to avoid an extra buffer copy
...
This patch causes Nonblocking and HsHa servers to explicitly enforce use of TFramedTransport and make sure that the actual invoker is deserializing from a TMemoryInputTransport. This should provide a substantial boost in performance.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@927695 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 05:12:27 +00:00
Bryan Duxbury
951e7e2480
java: Add JUnit to ivy config. Convert Nonblocking server tests to use JUnit. Framework laid to convert the remainder of the tests.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@927693 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 05:05:59 +00:00
Bryan Duxbury
27c9785758
THRIFT-739. java: TCompactProtocol isn't suitable for reuse in partialDeserialize
...
This patch changes TProtocol to support a reset() method that should clear any internal state. Stateless protocols can ignore it; stateful ones should implement it. TDeserializer has been updated to take advantage of this method.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@926460 13f79535-47bb-0310-9956-ffa450edef68
2010-03-23 03:50:16 +00:00
Bryan Duxbury
f35a9b9152
THRIFT-738. java: TCompactProtocol throws RuntimeException when it can't identify a type identifier
...
This patch causes it to throw TProtocolException instead.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@924364 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 16:47:41 +00:00
David Reiss
bec15e5105
THRIFT-661. java: Detect EOF in TIOStreamTransport
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920659 13f79535-47bb-0310-9956-ffa450edef68
2010-03-09 05:19:14 +00:00
David Reiss
487fd2e043
THRIFT-657. java: Detect negative length in TBinaryProtocol
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920658 13f79535-47bb-0310-9956-ffa450edef68
2010-03-09 05:19:11 +00:00
Bryan Duxbury
d93c626131
THRIFT-656. java: TDeserializer.toString is misnamed
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920656 13f79535-47bb-0310-9956-ffa450edef68
2010-03-09 05:14:34 +00:00
Bryan Duxbury
a268019e85
THRIFT-710. java: TBinaryProtocol should access buffers directly when possible
...
This patch makes TBinaryProtocol use direct buffer access in the relevant methods. Performance testing indicates as much as 2x speed boost, though your mileage may vary.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@918147 13f79535-47bb-0310-9956-ffa450edef68
2010-03-02 18:49:02 +00:00
Bryan Duxbury
0f52f07201
THRIFT-711. java: TFramedTransport should support direct buffer access
...
This patch adds direct buffer read access to TFramedTransport as well as a simple test for reading, direct buffer reading, and writing.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@918142 13f79535-47bb-0310-9956-ffa450edef68
2010-03-02 18:39:57 +00:00
Bryan Duxbury
4e7cf25b95
THRIFT-716. java: Field names can conflict with local variables in code for unions
...
This patch resolves the name clash issue by removing the unnecessary parameters from the generated method and using the protected variables directly instead.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@917130 13f79535-47bb-0310-9956-ffa450edef68
2010-02-28 05:19:38 +00:00
Bryan Duxbury
53cba3cfa2
THRIFT-689. java: Notify client of recoverable protocol errors on java server
...
When a protocol error occurs, the server will now send back a message containing the exception. Clients should be able to detect and rethrow these exceptions as appropriate.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@916825 13f79535-47bb-0310-9956-ffa450edef68
2010-02-26 21:38:42 +00:00
Bryan Duxbury
dee6d4260c
THRIFT-713. java: Java compareTo method throws NPE when any field isn't set.
...
This patch fixes a somewhat egregious bug in the generated compareTo for non-union structs and avoids possible NPEs.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@915499 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 19:06:25 +00:00
Bryan Duxbury
becaf53621
THRIFT-685. java: Direct buffer access to improve deserialization performance
...
This initial patch adds direct buffer access support to TDeserializer and TCompactProtocol, with the framework in place to be extended to other areas.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911510 13f79535-47bb-0310-9956-ffa450edef68
2010-02-18 18:27:51 +00:00
Bryan Duxbury
cd43a06405
THRIFT-703. Attempting to hash an unset union struct results in NPE
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911162 13f79535-47bb-0310-9956-ffa450edef68
2010-02-17 20:01:29 +00:00
Bryan Duxbury
f94f008d80
THRIFT-702. TUnion's toString method throws NPE if the union is unset
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@909645 13f79535-47bb-0310-9956-ffa450edef68
2010-02-12 22:49:40 +00:00
Bryan Duxbury
526112103c
don't put all the test cases and generated classes into the jar - reduces size of jar from ~1M to ~200k.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@908746 13f79535-47bb-0310-9956-ffa450edef68
2010-02-10 23:23:35 +00:00
Bryan Duxbury
c771944644
THRIFT-684. java: Add constructor to TNonblockingServerSocket to accept InetSocketAddress
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@901513 13f79535-47bb-0310-9956-ffa450edef68
2010-01-21 03:20:01 +00:00
Bryan Duxbury
db57aa0df9
THRIFT-677. java: IntRangeSet.java ignores first element in the constructor array
...
This change removes IntRangeSet from the codebase
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@899729 13f79535-47bb-0310-9956-ffa450edef68
2010-01-15 17:40:31 +00:00
Bryan Duxbury
62fb2ed1fe
THRIFT-608. java: Option parameter is ignored for one constructors in THsHaServer
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@899723 13f79535-47bb-0310-9956-ffa450edef68
2010-01-15 17:29:26 +00:00
Bryan Duxbury
c2ec7cae04
THRIFT-670. java: Unions don't skip unrecognizable fields correctly
...
This patch adds a test and a fix for the bug.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@894924 13f79535-47bb-0310-9956-ffa450edef68
2009-12-31 18:59:15 +00:00
Bryan Duxbury
d250314e66
(no ticket). java: Make Unions print binary values more tersely
...
Bytes were getting sign-extended out into giant strings of f's. This change makes sure only the bottom byte is used.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@894222 13f79535-47bb-0310-9956-ffa450edef68
2009-12-28 18:49:03 +00:00
Bryan Duxbury
2d80470bcb
THRIFT-632. java: Constants of enum types don't behave well
...
This patch causes constants of all types to be resolved differently by the compiler, and makes it so that constants of enum types contain a reference to the enum type so that code generators can produce the correct names.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@892358 13f79535-47bb-0310-9956-ffa450edef68
2009-12-18 19:41:11 +00:00
David Reiss
2727fab22f
THRIFT-645. java: Create ant rules for running the test client and server
...
I didn't make these depend on compile-test since ant doesn't seem to
detect that the class files are up to date, so it takes a really long
time to recompile everything.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@888931 13f79535-47bb-0310-9956-ffa450edef68
2009-12-09 19:30:01 +00:00
Todd Lipcon
53ae9f39d5
THRIFT-622. Add appropriate licensing information to get Thrift ready for a release.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@887812 13f79535-47bb-0310-9956-ffa450edef68
2009-12-07 00:42:38 +00:00
Bryan Duxbury
9af23d9327
THRIFT-551. java: Enumeration doesn't generate real enum in Java
...
This patch makes the compiler generate actual Enum classes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@882211 13f79535-47bb-0310-9956-ffa450edef68
2009-11-19 17:26:38 +00:00
Bryan Duxbury
aa9fb5dc9d
THRIFT-623. java: Use a Java enum to represent field ids in generated structs
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@835538 13f79535-47bb-0310-9956-ffa450edef68
2009-11-12 20:52:25 +00:00
Bryan Duxbury
e2e4ea1dcf
THRIFT-624. java: compareTo is broken for Unions with binary fields
...
This patch adds a special case for byte[] values in TUnion. It also fixes a related bug in TBaseHelper for comparing two byte arrays.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@835065 13f79535-47bb-0310-9956-ffa450edef68
2009-11-11 21:01:35 +00:00
Bryan Duxbury
2845b16eb2
THRIFT-565. java: Structs containing typedefs for incomparable objects will be considered comparable
...
This patch causes the compiler to fully unwrap typedefs when determining comparability.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@834119 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 15:55:22 +00:00