Commit Graph

361 Commits

Author SHA1 Message Date
Bryan Duxbury
63c2d378c5 THRIFT-1199. java: Union structs should have generated methods to test whether a specific field is currently set
Patch: Piotr Kozikowski

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1133482 13f79535-47bb-0310-9956-ffa450edef68
2011-06-08 17:46:55 +00:00
Jake Farrell
73b8dfc92c Thrift-1194: Java lib does not install artifacts to local dir correctly
Client: java
Patch: Jake Farrell

Fixes broken java lib install target to work properly and cleans up build.properties.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1130626 13f79535-47bb-0310-9956-ffa450edef68
2011-06-02 16:13:18 +00:00
Bryan Duxbury
5075a19677 THRIFT-1190. java: readBufferBytesAllocated in TNonblockingServer.java should be AtomicLong to fix FD leakage and general server malfunction
There was a race condition in the use of the memory limiting feature that would lead to memory loss.

Patch: Tom May

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1130231 13f79535-47bb-0310-9956-ffa450edef68
2011-06-01 17:19:57 +00:00
Bryan Duxbury
9a42239eec THRIFT-1170. java: Thrift Generated Code and Java 5
This patch adds a trivial java5 option to the java generator.

Patch: Greg Moulliet

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1126765 13f79535-47bb-0310-9956-ffa450edef68
2011-05-23 21:41:02 +00:00
Bryan Duxbury
b9e47c4ba9 THRIFT-1178. java: Java: TBase signature should be T extends TBase<?,?>
Patch: Ryan Rawson

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1126637 13f79535-47bb-0310-9956-ffa450edef68
2011-05-23 18:30:06 +00:00
Jake Farrell
c023d90e3b Thrift-1174: Publish as3 client implementation via Maven for use by flex-mojos users
Client: as3

Adds the ability to publish the as3 client to maven central repo along side the java and fb303 libs.




git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1125511 13f79535-47bb-0310-9956-ffa450edef68
2011-05-20 19:04:13 +00:00
Jake Farrell
6ece9be5c7 THRIFT-1155: Remove log4j dependency from java client
Client: java

Removed dependency for slf4j-log4j for pom and broke requirements for testing. This fixes those requirements and restores the build.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1096788 13f79535-47bb-0310-9956-ffa450edef68
2011-04-26 15:44:50 +00:00
Jake Farrell
b0cdd91a83 Thrift-1155: Remove log4j dependency from java client.
Client: java

slf4j-log4j should not be included with the pom since it is not required for the client. Any logger supported by slf4j can be used.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1096758 13f79535-47bb-0310-9956-ffa450edef68
2011-04-26 14:18:07 +00:00
Jake Farrell
e74caa84e3 Adding java build.properties file to the exported files list.
client: java




git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1095491 13f79535-47bb-0310-9956-ffa450edef68
2011-04-20 19:48:12 +00:00
Jake Farrell
4b8faf9e20 Thrift-363: Maven Deploy
Patch: jfarrell
Client lib: java

Adding the ability to publish the java client library as artifacts to the apache maven repository.     

Usage: ant -Drelease=true publish
Note: You must have a gpg key setup and push it to pgp.mit.edu and
  have a ~/.m2/settings.xml file containing your apache and gpg information.
  Thrift-1114 will help make this file more secure or unnecessary.

  <settings>
    <servers>
      <server>
        <id>apache.releases.https</id>
        <username>@APACHE_USERNAME@</username>
        <password>@APACHE_PASSWORD@</password>
      </server>
    </servers>
    <profiles>
      <profile>
        <id>gpg</id>
        <properties>
          <gpg.passphrase>@GPG_PASSPHRASE@</gpg.passphrase>
        </properties>
      </profile>
    </profiles>
  </settings>



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1095216 13f79535-47bb-0310-9956-ffa450edef68
2011-04-19 21:11:54 +00:00
Bryan Duxbury
55f7ffea5d THRIFT-363. java: Maven deploy
It finally works\!

Patch: Jake Farrell

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1085046 13f79535-47bb-0310-9956-ffa450edef68
2011-03-24 17:24:27 +00:00
Bryan Duxbury
177b52ab58 THRIFT-1101. java: bytebuffer length calculation in TBinaryProtocol writeBinary
This patch fixes a bug in Binary and Compact protocol that incorrectly calculates the length of the bytes to be written when the byte buffer being written has a nonzero array offset (such as after a slice() call).

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1083890 13f79535-47bb-0310-9956-ffa450edef68
2011-03-21 18:18:33 +00:00
Bryan Duxbury
ee7c7bb485 THRIFT-1050. java: Declaring an argument named 'manager' to a service method produces code that fails compile due to name conflicts with protected ivars in TAsyncClient
This patch adds a triple-underscore prefix to all the ivars in TAsyncClient, making it substantially more difficult to get a conflict.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1081868 13f79535-47bb-0310-9956-ffa450edef68
2011-03-15 17:25:23 +00:00
Roger Meier
3f067a86eb THRIFT-1084 Typo fixes
Patch: Bruce Mitchener


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1077939 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 13:35:05 +00:00
Roger Meier
d9924984db THRIFT-863 JavaScript fix Map Type
Patch: Henrique Mendonca


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1074194 13f79535-47bb-0310-9956-ffa450edef68
2011-02-24 16:04:03 +00:00
Roger Meier
60cb3baf8f THRIFT-1073 fix javadoc target
Patch: Diwaker Gupta


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1074173 13f79535-47bb-0310-9956-ffa450edef68
2011-02-24 14:45:03 +00:00
Roger Meier
a8738b5560 THRIFT-1065 Unexpected exceptions not proper handled on JS
THRIFT-847  same bahavior for Java and C++(test/cpp/src/TestServer.cpp)

Patch: Henrique Mendonca


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1073484 13f79535-47bb-0310-9956-ffa450edef68
2011-02-22 20:15:03 +00:00
Bryan Duxbury
0fd37f0871 THRIFT-447. java: Make an abstract base Client class so we can generate less code
This patch introduces a handful of abstract, non-generated classes that allow us to generate much less code for service implementations.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1068487 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 17:26:37 +00:00
Todd Lipcon
56c2d5682e THRIFT-1053. Provide a getUnderlyingTransport function for TSaslTransport
Patch: Devaraj Das


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1067719 13f79535-47bb-0310-9956-ffa450edef68
2011-02-06 18:13:10 +00:00
Mark Slee
a026b5d9eb THRIFT-1051. Applying @Override to interface method breaks compile on Java 1.5
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1064911 13f79535-47bb-0310-9956-ffa450edef68
2011-01-28 22:26:13 +00:00
Bryan Duxbury
c8d533b65e THRIFT-1038. java: Generated Java code for structures containing binary fields (or collections thereof) are not serializable (in the Java sense) even though they implement java.io.Serializable
This patch causes Java Serialized Thrift structs to be serialized onto the stream via the Compact Protocol.

Patch: Mathias Herberts

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1063907 13f79535-47bb-0310-9956-ffa450edef68
2011-01-26 22:42:02 +00:00
Bryan Duxbury
34c2dbd545 THRIFT-1041. java: TDeserializer holds onto a reference of the array it reads after it is done deserializing
This patch makes sure that after using the bytes passed in, no references are retained.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1063820 13f79535-47bb-0310-9956-ffa450edef68
2011-01-26 18:40:30 +00:00
Bryan Duxbury
c216556bd6 update version numbers to 0.7.0-dev
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1056453 13f79535-47bb-0310-9956-ffa450edef68
2011-01-07 18:45:29 +00:00
Roger Meier
e0cac988b6 THRIFT-1022 Typo cleanup patch
Patch: Anatol Pomozov


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1049968 13f79535-47bb-0310-9956-ffa450edef68
2010-12-16 13:15:49 +00:00
Bryan Duxbury
22903cb542 THRIFT-1015. java: TUnion does not handle ByteBuffer in toString
This patch adds a test case and fixes the toString method of TBaseHelper for ByteBuffers.

Patch: Takashi Yonebayashi

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1041590 13f79535-47bb-0310-9956-ffa450edef68
2010-12-02 21:29:20 +00:00
Bryan Duxbury
708971351f THRIFT-1009. java: TUnion does not correctly deep copy a ByteBuffer
This patch adds a case to deepCopyObject for ByteBuffer, along with a test case that verifies the change in functionality.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1040358 13f79535-47bb-0310-9956-ffa450edef68
2010-11-30 00:33:48 +00:00
Bryan Duxbury
a5eb848930 THRIFT-1008. java: byte[] accessors throw NPE on unset field
Further extra null check in accessors that use TBaseHelper.rightSize().

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1038850 13f79535-47bb-0310-9956-ffa450edef68
2010-11-24 22:30:38 +00:00
Bryan Duxbury
fea49cb840 THRIFT-1008. java: byte[] accessors throw NPE on unset field
This patch adds a null check to TBaseHelper.rightSize().

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1038833 13f79535-47bb-0310-9956-ffa450edef68
2010-11-24 21:30:00 +00:00
Bryan Duxbury
bbe36c5d35 THRIFT-970. java: Under heavy load, THttpClient may fail with 'too many open files'
This patch updates our THttpClient to have two different modes of operation: its current functionality and a new mode that uses Apache's HttpClient library to provide higher throughput and better pooling functionality.

Patch: Mathias Herberts

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1031668 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05 17:14:52 +00:00
Roger Meier
a8b52c7a8b THRIFT-6 TLP URL's and email's, haskell, more details
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1029964 13f79535-47bb-0310-9956-ffa450edef68
2010-11-02 07:33:30 +00:00
Bryan Duxbury
452dc69a6b improve formatting in TProtocolUtil.skip
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1028140 13f79535-47bb-0310-9956-ffa450edef68
2010-10-27 23:39:58 +00:00
Bryan Duxbury
b6722bf8c4 THRIFT-377. java: TFileTransport port in Java
This patch adds TFileTransport to the java library. This transport is not a general-purpose file transport; instead, it is more of a way to execute one-way RPC via an offline file process.

Patch: Joydeep Sen Sarma

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1028136 13f79535-47bb-0310-9956-ffa450edef68
2010-10-27 23:26:52 +00:00
Bryan Duxbury
8c9c8bf8f0 THRIFT-517. java:TExceptions thrown by server result in cryptic error message on client - Tried to read 4 bytes, but only got 0 bytes
This tiny change improves the message to make it marginally more obvious that the server-side might be the culprit.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1028131 13f79535-47bb-0310-9956-ffa450edef68
2010-10-27 23:15:35 +00:00
Roger Meier
2fde9eee6f THRIFT-971 java module can't be compiled without ivy and network connection
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1028075 13f79535-47bb-0310-9956-ffa450edef68
2010-10-27 19:19:04 +00:00
Bryan Duxbury
a6ce16470d THRIFT-949. java: Modify the TEnum interface so it defines a method similar to findByValue
This patch adds a new helper class that makes it easier to get instances of generic TEnum descendents by value.

Patch: Mathias Herberts

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1028051 13f79535-47bb-0310-9956-ffa450edef68
2010-10-27 17:54:10 +00:00
Roger Meier
5013de297a THRIFT-960 Java: remove TestServer, TestNonblockingServer and TestClient from Unittest
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1027248 13f79535-47bb-0310-9956-ffa450edef68
2010-10-25 19:57:26 +00:00
Roger Meier
2067c1f01b THRIFT-960 switch back to TThreadPoolServer with AbstractServerArgs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1026714 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 23:50:48 +00:00
Roger Meier
5ad70a1a55 THRIFT-960 update to use AbstractServerArgs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1026712 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 23:35:46 +00:00
Roger Meier
62b7cfb7b9 THRIFT-960 Java: add TestServer, TestNonblockingServer and TestClient again
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1026704 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 22:25:04 +00:00
Bryan Duxbury
e703ed2ce6 THRIFT-745. java: Make it easier to instantiate servers
This patch replaces the multitude of constructors with builder-esque Args objects for each server and single constructor.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1026482 13f79535-47bb-0310-9956-ffa450edef68
2010-10-22 20:23:57 +00:00
Roger Meier
2287278140 THRIFT-6 update Version Info for several languages, add print-version to Makefile.am
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1026299 13f79535-47bb-0310-9956-ffa450edef68
2010-10-22 11:20:25 +00:00
Bryan Duxbury
8166073e7f THRIFT-959. java: TSocket seems to do its own buffering inefficiently
This patch removes the buffering from TSocket. This seems to improve performance marginally on small reads and writes that are buffered elsewhere (like the Framed Transport).

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1025678 13f79535-47bb-0310-9956-ffa450edef68
2010-10-20 19:04:07 +00:00
Bryan Duxbury
206c0dc1af THRIFT-947. java: Provide a helper method to determine the TProtocol used to serialize some data.
Patch: Mathias Herberts

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1024455 13f79535-47bb-0310-9956-ffa450edef68
2010-10-19 23:00:27 +00:00
Bryan Duxbury
2376684d86 THRIFT-957. java: THsHaServer: Change access modifier of the invoker field.
This patch adds a new overridable method to allow subclasses to specify their own Runnable implementation.

Patch: Benjamin Coverston

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1024343 13f79535-47bb-0310-9956-ffa450edef68
2010-10-19 18:06:45 +00:00
Bryan Duxbury
1b13083def THRIFT-106. java: TSSLServerSocket
This patch adds support for SSL-encrypted client and server sockets.

Patch: Nirmal Ranganathan

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1024328 13f79535-47bb-0310-9956-ffa450edef68
2010-10-19 17:20:57 +00:00
Bryan Duxbury
e8ddffe7ba THRIFT-958. java: Change accessmodifer on trans_ field in the FrameBuffer class to public.
Patch: Benjamin Coverston

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1023008 13f79535-47bb-0310-9956-ffa450edef68
2010-10-15 16:40:34 +00:00
Bryan Duxbury
4c5689269f THRIFT-951. java: Add a new isServing() method to TServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1021941 13f79535-47bb-0310-9956-ffa450edef68
2010-10-12 22:32:23 +00:00
Bryan Duxbury
21cd3180ef spacing cleanup
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1021535 13f79535-47bb-0310-9956-ffa450edef68
2010-10-11 22:13:23 +00:00
Bryan Duxbury
8684df9a79 clear a bunch of java warnings, unused code and imports, etc
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1021531 13f79535-47bb-0310-9956-ffa450edef68
2010-10-11 22:01:27 +00:00
Bryan Duxbury
f969bcb7d8 THRIFT-862. java: Async client issues / improvements
This patch improves quite a large number of things about the async client code.

Patch: Ning Liang

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005221 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 20:04:40 +00:00
Bryan Duxbury
b3d0aa0c82 THRIFT-946. java: Augment FieldValueMetaData so it differentiates 'string' and 'binary' fields.
This patch adds a new method to the FieldMetaData class that indicates binary or not.

Patch: Mathias Herberts

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005220 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 20:00:03 +00:00
Bryan Duxbury
1df96ce22f THRIFT-945. java: TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
This patch adds a test for the problem and fixes the issue by setting the current method after a call has been started.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1004865 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 00:28:10 +00:00
Bryan Duxbury
5bb525ccf9 THRIFT-939. java: optional binary fields throw NPE on default byte[] getters
This patch deals with null ByteBuffers correctly.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1003212 13f79535-47bb-0310-9956-ffa450edef68
2010-09-30 19:36:05 +00:00
Todd Lipcon
b1a283f11e THRIFT-912. java: Fix some bugs in SASL implementation, update protocol spec slightly
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001973 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 00:11:01 +00:00
Todd Lipcon
84a7c2a901 THRIFT-931. java: Add log4j.properties missing from previous commit
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001971 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 00:02:53 +00:00
Todd Lipcon
fcaa8f5364 THRIFT-931. java: Use log4j for Java tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001967 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27 23:51:22 +00:00
Bryan Duxbury
3a3686fd51 THRIFT-917. java: THsHaServer should not accept an ExecutorService without catching RejectedExecutionException
This patch catches RejectedExecutionException from requestInvoke and closes the client connection when that occurs.

Patch: Ed Ceaser

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001820 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27 17:12:36 +00:00
Bryan Duxbury
d920765c66 THRIFT-882. java: deep copy of binary fields does not copy ByteBuffer characteristics (arrayOffset, position)
This patch ensures that binary fields are copied correctly.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@998275 13f79535-47bb-0310-9956-ffa450edef68
2010-09-17 19:27:36 +00:00
Bryan Duxbury
a7420b6593 THRIFT-894. java: Make default accessors for binary fields return byte[]; provide new accessors to get ByteBuffer version
This patch causes the underlying ByteBuffer that backs a binary field to be hidden behind a default accessor that provides a byte[] interface. This should allow users who skipped 0.4 to update their generated code without breaking any of their other code. A new accessor has been added that allows a way down to the underlying ByteBuffer for those experts who want to take advantage.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996579 13f79535-47bb-0310-9956-ffa450edef68
2010-09-13 15:42:36 +00:00
Bryan Duxbury
a4c6d64e80 java: tiny improvement to async client manager test, for real this time
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996329 13f79535-47bb-0310-9956-ffa450edef68
2010-09-12 15:31:50 +00:00
Bryan Duxbury
a97414674c java: tiny improvement to async client manager test
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996328 13f79535-47bb-0310-9956-ffa450edef68
2010-09-12 15:30:06 +00:00
Bryan Duxbury
13ad873d18 THRIFT-896. java: TNonblockingSocket.isOpen() returns true even after close()
This patch makes TNonblockingSocket.isOpen() have more expected behavior.

Patch: Eric Jensen

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@995939 13f79535-47bb-0310-9956-ffa450edef68
2010-09-10 19:08:00 +00:00
Bryan Duxbury
34628f3e7a THRIFT-250. java: ExecutorService as a constructor parameter for TServer
This patch adds a new constructor that accepts an ExecutorService.

Patch: Ed Ceaser

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@995847 13f79535-47bb-0310-9956-ffa450edef68
2010-09-10 16:16:01 +00:00
Bryan Duxbury
855294b213 THRIFT-888. java: async client should also have nonblocking connect
This patch adds optional nonblocking connect behavior.

Patch: Eric Jensen

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@995262 13f79535-47bb-0310-9956-ffa450edef68
2010-09-08 21:47:45 +00:00
Bryan Duxbury
d483712972 THRIFT-876. java: Add SASL support
This patch adds support for a SASL-secured transport to the Java library. In its current form, it only works for the blocking-IO servers.

Patch: Aaron T Meyers

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@993563 13f79535-47bb-0310-9956-ffa450edef68
2010-09-08 00:06:35 +00:00
Bryan Duxbury
bcfb72a60b THRIFT-879. java: Remove @Override from TUnion.clear
Removes the unnecessary annotation.

Patch: Dave Engberg

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990931 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 20:27:32 +00:00
Todd Lipcon
90ec5bfcd0 THRIFT-873. java: Java tests fail due to Too many open files
- Drops TestTAsyncClientManager to use only 200 clients instead of 500
- Changes each unit test to run in its own JVM instead of sharing them.
- Allows the port used for binding the test servers to be configured from the command line


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990032 13f79535-47bb-0310-9956-ffa450edef68
2010-08-27 06:16:37 +00:00
Bryan Duxbury
66467a7779 THRIFT-693. java: Thrift compiler generated java code that throws compiler warnings about deprecated methods.
This patch removes the deprecated methods from TBase and makes some generator changes to accommodate.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@987805 13f79535-47bb-0310-9956-ffa450edef68
2010-08-21 17:48:18 +00:00
Bryan Duxbury
3adf8aad36 THRIFT-845. java: async client does not respect timeout
This patch adds timeout handling to async method calls through TAsyncClientManager.

Patch: Ning Liang

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@987323 13f79535-47bb-0310-9956-ffa450edef68
2010-08-19 21:41:58 +00:00
Bryan Duxbury
0bb034008c THRIFT-831. java: FramedTransport implementation that reuses its buffers
This patch adds a TFastFramedTransport that is compatible with TFramedTransport, but makes use of a pair of internal, automatically-expanding buffers to avoid unnecessary reallocations. This makes interactions with the transport up to 2.5x faster.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@985049 13f79535-47bb-0310-9956-ffa450edef68
2010-08-13 00:13:16 +00:00
Bryan Duxbury
f6b0e7cb38 THRIFT-842. java: Upgrade to current version of commons-lang (2.5 instead of 2.4) and/or change dependency in ivy.xml to not be exact
I switched us to using commons-lang 2.5.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@985042 13f79535-47bb-0310-9956-ffa450edef68
2010-08-12 23:42:45 +00:00
Bryan Duxbury
f5abd26858 THRIFT-830. java: Switch binary field implementation from byte[] to ByteBuffer
This patch switches the implementation of binary fields to ByteBuffer in the Java generated code, yielding up to 2.5x speed boost.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@982839 13f79535-47bb-0310-9956-ffa450edef68
2010-08-06 00:18:25 +00:00
Bryan Duxbury
5a9fc65f55 oops, needed to add an ivy dependency on the servlet api jar
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@982823 13f79535-47bb-0310-9956-ffa450edef68
2010-08-05 23:22:02 +00:00
Bryan Duxbury
d74ca156b3 THRIFT-814. java: Include a TServlet in the standard Thrift distribution
This patch adds a TServlet implementation of the HttpServlet interface to be used with various containers. 

Patch: Mathias Herberts

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@982802 13f79535-47bb-0310-9956-ffa450edef68
2010-08-05 22:05:35 +00:00
Bryan Duxbury
067a7beb73 THRIFT-836. java: Race condition causes CancelledKeyException in TAsyncClientManager
This patch removes an erroneous key cancellation and adds exception handling for a bunch of different exceptions.
Patch: Ning Liang

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@982789 13f79535-47bb-0310-9956-ffa450edef68
2010-08-05 21:13:06 +00:00
Bryan Duxbury
5226eeaaaa THRIFT-751. java: Add clear() method to TBase
This patch adds a clear() method to the TBase interface and causes the compiler to generate implementations.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@982774 13f79535-47bb-0310-9956-ffa450edef68
2010-08-05 20:44:53 +00:00
Bryan Duxbury
d8c7757b9d THRIFT-833. java: build.xml in lib/java is missing a classpathref attribute for the javadoc task
Turns out there was a missing classpathref that was causing lots of spurious warnings to be printed. This patch fixes that.

Patch: Nate McCall

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@980548 13f79535-47bb-0310-9956-ffa450edef68
2010-07-29 19:30:47 +00:00
Bryan Duxbury
76c2dcc4d3 THRIFT-714. java: maxWorkerThreads parameter to THsHaServer has no effect
This patch removes the non-functioning maxWorkerThreads option and renames minWorkerThreads to workerThreads.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@980234 13f79535-47bb-0310-9956-ffa450edef68
2010-07-28 21:30:24 +00:00
Bryan Duxbury
dc4a871e12 add license headers to a smattering of files
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@979366 13f79535-47bb-0310-9956-ffa450edef68
2010-07-26 17:18:30 +00:00
Bryan Duxbury
99f2ab7790 THRIFT-818. java: Async client doesn't send method args
This patch amends the tests and fixes the bug.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@963901 13f79535-47bb-0310-9956-ffa450edef68
2010-07-13 23:11:04 +00:00
Bryan Duxbury
162b3ac646 THRFIT-804. java: CompareTo is broken for unions set to map, set, or list
This patch fixes TUnion's compareTo, and factors out the standard part of the comparison to TBaseHelper.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@957350 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 21:17:48 +00:00
Bryan Duxbury
b7887b860b THRIFT-789. Files missing proper Apache license header
Added the Apache license header to a bunch of files that were missing it.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@953167 13f79535-47bb-0310-9956-ffa450edef68
2010-06-09 21:30:54 +00:00
Bryan Duxbury
d58ccec660 THRIFT-768. java: Async client for Java
This patch adds an implementation of a fully-asynchronous client that makes use of NIO. Stubs for the async method calls are generated along with the existing synchronous ones.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@948492 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 16:34:48 +00:00
Bryan Duxbury
fb90e77e45 THRIFT-774. java: TDeserializer should provide a partialDeserialize method for primitive types
This patch adds partialDeserialize* methods for each of the supported Thrift primitives.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@943679 13f79535-47bb-0310-9956-ffa450edef68
2010-05-12 20:54:07 +00:00
Bryan Duxbury
06491d7bb5 THRIFT-765. java: Revert the changes applied by THRIFT-765, as they appear to be unstable
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@940013 13f79535-47bb-0310-9956-ffa450edef68
2010-05-01 13:45:38 +00:00
Bryan Duxbury
12abe94977 THRIFT-765. java: Improved string encoding and decoding performance
This patch fixes a regression caused by the previous 'fast' implementation, in particular, dealing with unicode characters that need to be encoded as surrogate pairs. The performance stays about the same.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@939822 13f79535-47bb-0310-9956-ffa450edef68
2010-04-30 21:35:38 +00:00
Bryan Duxbury
332a625118 THRIFT-766. java: Propagate TSocket timeout to connect
This patch makes sure the specified timeout is used when opening connections, too.

Patch: David Helder

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@939380 13f79535-47bb-0310-9956-ffa450edef68
2010-04-29 17:08:17 +00:00
Bryan Duxbury
abfc54fa06 java: add another testcase to TestUtf8Helper
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@939142 13f79535-47bb-0310-9956-ffa450edef68
2010-04-29 00:33:34 +00:00
David Reiss
7e36df1c07 THRFIT-601. java: Add readLength support to TBinaryProtocol.Factory
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@938206 13f79535-47bb-0310-9956-ffa450edef68
2010-04-26 19:37:53 +00:00
David Reiss
a005777ae5 THRIFT-601. java: Allow a maximum frame size for TFramedTransport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@938205 13f79535-47bb-0310-9956-ffa450edef68
2010-04-26 19:37:44 +00:00
Bryan Duxbury
719ab84318 THRIFT-765. java: Improved string encoding and decoding performance
This change makes Java's string/utf8 encoding and decoding about 2x faster.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@937812 13f79535-47bb-0310-9956-ffa450edef68
2010-04-25 15:20:02 +00:00
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
Bryan Duxbury
6731b57b58 THRIFT-620. java: Compact Protocol should call readAll, not read
This patch switches to calling readAll instead of read.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@832633 13f79535-47bb-0310-9956-ffa450edef68
2009-11-04 00:30:10 +00:00
Bryan Duxbury
72fd472476 THRIFT-589. java: Add Field Name to Field ID Mapping
Java Thrift structs now have a static mapping of field name to field ID.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@825371 13f79535-47bb-0310-9956-ffa450edef68
2009-10-15 01:24:26 +00:00
Bryan Duxbury
51f288062d THRIFT-446. java: PartialDeserialization in Java
This patch adds a partialDeserialize method to TDeserializer that allows you to request a specific subfield of the serialized data.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@820786 13f79535-47bb-0310-9956-ffa450edef68
2009-10-01 20:53:45 +00:00
Bryan Duxbury
315a5dbe29 THRIFT-588. java: Generated .equals method throws NPE for thrift object
If other is null, then they're not equal.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@818998 13f79535-47bb-0310-9956-ffa450edef68
2009-09-25 20:28:35 +00:00
Bryan Duxbury
ab3666e6ca THRIFT-409. java: Add "union" to Thrift
This patch introduces new IDL syntax for creating Unions, explicityly single-valued structs. While the parser changes are portable, this patch only includes the actual generated code changes for the Java library. Other libraries can continue to generate a struct with the same fields and remain compatible until they are able to implement the full shebang.




git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@810300 13f79535-47bb-0310-9956-ffa450edef68
2009-09-01 23:03:47 +00:00
David Reiss
af81de0123 Revert r806014 "THRIFT-562. java: Java is inconsistent ..."
- It changed the semantics of default-presence fields.
- It messed up calls that accept exceptions.
- Full details on issue.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@808609 13f79535-47bb-0310-9956-ffa450edef68
2009-08-27 20:27:09 +00:00
Bryan Duxbury
2c8cd944e5 THRIFT-562. java: Java is inconsistent checking for required fields
This patch makes the compiler act consistently regarding what it means to be required or optional. Additionally, it cleans up the tests to actually use the Fixtures class all over.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@806014 13f79535-47bb-0310-9956-ffa450edef68
2009-08-20 01:00:18 +00:00
Bryan Duxbury
2f45e789f6 THRIFT-566. java: jar file should contain copies of LICENSE and NOTICE files
LICENSE and NOTICE are now included in the jar file by the build process. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@806013 13f79535-47bb-0310-9956-ffa450edef68
2009-08-20 00:55:12 +00:00
Bryan Duxbury
c27cda57a0 THRIFT-558. java: Replace use of log4j by commons-logging in Java library and generated Java code
This patch switches Thrift to use slf4j instead of log4j. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@804349 13f79535-47bb-0310-9956-ffa450edef68
2009-08-14 20:04:15 +00:00