Commit Graph

1713 Commits

Author SHA1 Message Date
Jake Farrell
f9f01fa1e0 THRIFT-1394:Treatment of optional fields is not consistent between C++ and Java
Client: cpp
Patch: Diwaker Gupta

In CPP, all optional fields are guarded by the isset helper struct. On Java, however, the generated code takes advantage of nullable types: for containers, structs, exceptions, enums, and, notably, strings, the generator elides explicit use of an "isset" bit vector and instead emits checks of the form "field null". This leads to varying behavior between the two languages: an optional string field with a default value will have {{isset[fieldid]}} false on C, but the equivalent test in Java will be true.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1236529 13f79535-47bb-0310-9956-ffa450edef68
2012-01-27 04:48:26 +00:00
Jake Farrell
6ce2704a14 Thrift-1502:TSimpleServer::serve(): Do not print out error message if server was stopped.
Client: cpp
Patch: Vibhav Sreekanti

Print msg on TSimpleServer stop.


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1236523 13f79535-47bb-0310-9956-ffa450edef68
2012-01-27 04:32:17 +00:00
Jake Farrell
b2c4952799 Thrift-1465:Visibility of methods in generated java code
Client: java
Patch: Ashutosh Chauhan

Changes visibility of processor getProcessMap() and getEmptyArgs() methods


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1236515 13f79535-47bb-0310-9956-ffa450edef68
2012-01-27 04:01:54 +00:00
Jake Farrell
100f616afd THRIFT-1498:Allow TThreadedPoolServer.Args to pass a ExecutorService
Client: java
Patch: Scott Chen

Adds ability to assign a ExecutorService from TThreadedPoolServer.Args.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1236505 13f79535-47bb-0310-9956-ffa450edef68
2012-01-27 03:19:01 +00:00
Roger Meier
ac70b5f832 THRIFT-1478 TJSONProtocol in PHP
fix: remove dist and add lunit log format

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1235467 13f79535-47bb-0310-9956-ffa450edef68
2012-01-24 20:18:07 +00:00
Roger Meier
6823b6d729 add info on proxy usage
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1235438 13f79535-47bb-0310-9956-ffa450edef68
2012-01-24 19:35:09 +00:00
Roger Meier
33b720a958 THRIFT-1478 TJSONProtocol in PHP
Patch: Greg Fodor, Andrew Grumet, Roger Meier

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1235403 13f79535-47bb-0310-9956-ffa450edef68
2012-01-24 18:42:46 +00:00
Roger Meier
f0e517db99 THRIFT-1489 Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
Patch: Kieran Benton

changes by roger:
- use ServiceModel, DataContract only when wcf is enabled
- indent space vs tab
- remove issue on lib/cpp/README_WINDOWS
- add testStringMap on test/csharp/ThriftTest/TestServer.cs
- add build to test/csharp/ThriftTest/maketest.sh

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1232578 13f79535-47bb-0310-9956-ffa450edef68
2012-01-17 21:20:56 +00:00
Roger Meier
36f7a72646 THRIFT-1491 Uninitialize processorFactory_ member in TServer.h
Patch: Ben Frederickson

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1232544 13f79535-47bb-0310-9956-ffa450edef68
2012-01-17 19:18:13 +00:00
Jake Farrell
d77d180355 Thrift:1488 - src/concurrency/Thread.h:91:58: error: invalid conversion from 'pthread_t {aka _opaque_pthread_t*}'
Client: cpp
Patch: Jake Farrell

Added cast to Thread.h get_current()



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1232424 13f79535-47bb-0310-9956-ffa450edef68
2012-01-17 14:28:05 +00:00
Roger Meier
4749b4f66e THRIFT-1490 Windows-specific header files - fixes & tweaks
Patch: Peace C

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1232397 13f79535-47bb-0310-9956-ffa450edef68
2012-01-17 12:25:22 +00:00
Roger Meier
eaa61d8fda THRIFT-1267 Node.js can't throw exceptions
Patch: Henrique Mendonca

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1230797 13f79535-47bb-0310-9956-ffa450edef68
2012-01-12 21:38:29 +00:00
Roger Meier
333bbf3d88 THRIFT-1485 Performance: pass large and/or refcounted arguments as "const"
Patch: Jens Geyer

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1228965 13f79535-47bb-0310-9956-ffa450edef68
2012-01-08 21:51:08 +00:00
Roger Meier
45a372679d THRIFT-1473 JSON context stack may be left in an incorrect state when an exception is thrown during read or write operations
Patch: Jens Geyer

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1228963 13f79535-47bb-0310-9956-ffa450edef68
2012-01-08 21:44:44 +00:00
Roger Meier
c8d5d4d911 THRIFT-1486 Javascript manual testserver not returning content types
Patch: Andrew Grumet

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1228717 13f79535-47bb-0310-9956-ffa450edef68
2012-01-07 20:32:24 +00:00
Bryan Duxbury
6972041392 THRIFT-1480. py: remove tabs, adjust whitespace and address PEP8 warnings
This patch addresses a host of PEP8 lint problems.

Patch: Will Pierce

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1226890 13f79535-47bb-0310-9956-ffa450edef68
2012-01-03 17:32:30 +00:00
Bryan Duxbury
a3df547c84 THRIFT-317. java: Issues with Java struct validation
Nested structs will now be validated before serialization starts.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1225035 13f79535-47bb-0310-9956-ffa450edef68
2011-12-27 22:26:59 +00:00
Bryan Duxbury
e7bec40882 THRIFT-1468. java: Memory leak in TSaslServerTransport
This patch changes a particular map element to a WeakReference and thus avoids some awkward un-GC-ableness.

Patch: Mithun Radhakrishnan"


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1222397 13f79535-47bb-0310-9956-ffa450edef68
2011-12-22 19:04:16 +00:00
Bryan Duxbury
1e79cb40f5 THRIFT-1469. java: Java isset space optimization
This patch gives the generated code some variable-sized options for the isset bit vector. The compiler will attempt to use byte, short, int and long types before reverting to a BitSet for structs with a LOT of optional fields. This should save a fair amount of memory in a lot of cases.

Patch: Brian Bloniarz

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1221828 13f79535-47bb-0310-9956-ffa450edef68
2011-12-21 18:13:29 +00:00
Jake Farrell
a2a9ee993e Thrift-1467:Possible AV with empty strings when using JSON protocol
Client:delphi
Patch: Jens Geyer

Fixes exception raised on empty json strings.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1214955 13f79535-47bb-0310-9956-ffa450edef68
2011-12-15 20:50:31 +00:00
Jake Farrell
f3e48d4a2e THRIFT-1464: AbstractNonblockingServer.FrameBuffer TNonblockingTransport accessor changed from public to private
Client: java
Patch: Jake Farrell

Fixes accessor for TNonblockingTransport in AbstractNonblockingServer.FrameBuffer that was changed from public to private



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1214557 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 23:48:22 +00:00
Roger Meier
12d705390d THRIFT-1461 Recent TNonblockingServer changes broke --enable-boostthreads=yes, Windows
Patch: Alexandre Parenteau

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1214547 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 23:35:28 +00:00
Jake Farrell
ea949fbaf9 Thrift-1462: add more strict compiler flags
Reverting patch due to it breaking compilers older than 4.4 (os x, centos 5.x, etc)



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213901 13f79535-47bb-0310-9956-ffa450edef68
2011-12-13 20:02:33 +00:00
Bryan Duxbury
3371925d18 THRIFT-1449. rb: Ruby client does not work on solaris (?)
This patch adds a new argument to the socket calls that seems to fix the problems while not causing any detriment to non-Solaris systems.

Patch: Erik Hetzner

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213837 13f79535-47bb-0310-9956-ffa450edef68
2011-12-13 18:33:15 +00:00
Roger Meier
ca10fd4a51 THRIFT-1462 add more strict compiler flags(-Wall -Wextra -std=c++0x -pedantic)
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213459 13f79535-47bb-0310-9956-ffa450edef68
2011-12-12 22:00:23 +00:00
Roger Meier
611f90cf9e THRIFT-1459 declare shared_ptr as boost::shared_ptr
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213090 13f79535-47bb-0310-9956-ffa450edef68
2011-12-11 22:08:51 +00:00
Roger Meier
3fc4819617 THRIFT-1272 add subclass of ReadWriteMutex that avoids writer
starvation
Patch: Dave Watson

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213067 13f79535-47bb-0310-9956-ffa450edef68
2011-12-11 21:05:35 +00:00
Roger Meier
1d282a95c6 THRIFT-1273 Replace assignment of a negative literal to an
unsigned int with assignment of an unsigned int
Patch: Dave Watson

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213055 13f79535-47bb-0310-9956-ffa450edef68
2011-12-11 20:30:21 +00:00
Roger Meier
3781c2419c THRIFT-1337 support maximum frame size in TNonblockingServer
Patch: Dave Watson

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213052 13f79535-47bb-0310-9956-ffa450edef68
2011-12-11 20:07:21 +00:00
Jake Farrell
343c61d6a7 Thrift-1441: Generate constructor with parameters for exception class to let it update message property automatically.
Client:delphi
Patch: Kenjiro Fukumitsu

Add the function to delphi generator that generates constructor with parameters to initialize members,if the class is exception and have more than zero parameters.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1212226 13f79535-47bb-0310-9956-ffa450edef68
2011-12-09 02:29:56 +00:00
Jake Farrell
12ac2acfaf Thrift-1456: System.Net.HttpWebRequest' does not contain a definition for 'Proxy'
Client: delphi
Patch: Jens Geyer

Fix for Silverlight 'System.Net.HttpWebRequest' does not contain a definition for 'Proxy' 



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1212223 13f79535-47bb-0310-9956-ffa450edef68
2011-12-09 02:21:37 +00:00
Roger Meier
6c26fad246 THRIFT-1433 TServerSocket fix for MSVC
Patch: Peace C

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1212109 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 20:44:16 +00:00
Roger Meier
d0cdecf4a1 THRIFT-1442 TNonblockingServer: Refactor to allow multiple IO Threads
Fix Warnings
Patch: Dave Watson

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1212067 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 19:34:01 +00:00
Roger Meier
284a9b56d7 THRIFT-1037 Proposed changes to support Silverlight, Windows Phone and AsyncCTP v3
Patch: Damian Mehers & Jens Geyer

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1211880 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 13:39:56 +00:00
Roger Meier
406fc7497d THRIFT-1325 Thrift SVN and latest GCC issue: Undefined symbols: "apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::VERSION_MASK"
Patch: Brandon Arp

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1211842 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 11:32:21 +00:00
Jake Farrell
f05e1486e4 Thrift-1451:FramedTransport: Prevent infinite loop when writing
Client: cpp
Patch: Dave Watson

Invoked test client with a big enough query to trigger the resize
code.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1211737 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 02:08:38 +00:00
Jake Farrell
23bf35daa3 Thrift-1454:Better handling of write on a closed TSocket
Client: cpp
Patch: Dave Watson

TSocket.send() was expecting a send() on the underlying socket
to fail by returning zero, but the actual behavior is to raise
an exception.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1211736 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 02:02:20 +00:00
Jake Farrell
21f8dc900a Thrift-1090: Document the generation of a file called "Constants.java"
Client: java
Patch: Jake Farrell

Fixing test cases left out in initial patch. 


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210765 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 03:13:55 +00:00
Jake Farrell
753b6c5674 Thrift-1444:FunctionRunner - add syntactic sugar to create shared_ptrs
Client: cpp
Patch: Dave Watson

Simplify FunctionRunner addTask calls.


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210741 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 01:41:59 +00:00
Jake Farrell
b0d9560c33 Thrift-1442: TNonblockingServer: Refactor to allow multiple IO Threads
Client: cpp
Patch: Dave Watson

Ads multiple IO threads to TNonblocking Server


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210737 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 01:17:26 +00:00
Jake Farrell
9689d89df1 Thrift-1340: Add support of ARC to Objective-C
Client: Objective-c
Patch: Hirano Satoshi

Adds -objc-arc flag to compiler and if used removes the retain/release/autorelease from generated code



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210732 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 01:07:17 +00:00
Jake Farrell
6fa2b30940 Thrift-1446:Compile error with Delphi 2009 in constant initializer
Client: delphi
Patch: Kenjiro Fukumitsu 

Generated code cannot be compiled with Delphi 2009 due to the bug in constant initializer.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210728 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 00:59:30 +00:00
Jake Farrell
9901069442 Updating trunk to 0.9.0 version.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1208214 13f79535-47bb-0310-9956-ffa450edef68
2011-11-30 02:09:46 +00:00
Jake Farrell
b03a59cc5c Thrift-1427: PHP library uses non-multibyte safe functions with mbstring function overloading
Client: php
Patch: Bryan Alves

Fixes issue with php overloaded mbstring to be binary-safe for strlen and substr.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1207960 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 16:45:51 +00:00
Jake Farrell
a0dd75d7c8 Thrift-386: Make it possible to build the Python library without the extension
Client: py
Patch: Jake Farrell

patch for py lib which will attempt to build the C extension and if it fails falls back to just building the library without any extensions.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1206398 13f79535-47bb-0310-9956-ffa450edef68
2011-11-26 05:23:09 +00:00
Roger Meier
289cbb2e4c THRIFT-1431 Rename 'sys' module to 'util'
Patch: David Worms

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1205576 13f79535-47bb-0310-9956-ffa450edef68
2011-11-23 20:44:09 +00:00
Jake Farrell
ac10256fcc Thrift-1435: make TException.Message property conformant to the usual expectations
Client: delphi
Patch: Jens Geyer

Make delphi exceptions act like standard TException within other languages 



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1205415 13f79535-47bb-0310-9956-ffa450edef68
2011-11-23 14:30:41 +00:00
Jake Farrell
e34009b76c Thrift-1391: Improved Delphi XE test cases
Client: delphi
Patch: Jens Geyer

Improved TestClient:
 - collects test results and reports errors
 - added or completed a number of tests, like listTest, mapmapTest, multiExceptionTest and others
 - exception content test also included



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1202948 13f79535-47bb-0310-9956-ffa450edef68
2011-11-17 00:17:29 +00:00
Roger Meier
1b533e9177 THRIFT-1387 Build MSVC libraries with Boost Threads instead of Pthreads
Minor Fix: add PDB files to vcxproj files
Patch: Peace C

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1202843 13f79535-47bb-0310-9956-ffa450edef68
2011-11-16 19:11:34 +00:00
Jake Farrell
e0c5316736 Thrift-1426: Dist package missing files for release 0.8
Client: build
Patch: Jake Farrell

Cleans up dist target and removes extra folders.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1202686 13f79535-47bb-0310-9956-ffa450edef68
2011-11-16 12:58:36 +00:00