Author: roger
Date: Tue May  1 20:43:26 2012
New Revision: 1332809

URL: http://svn.apache.org/viewvc?rev=1332809&view=rev
Log:
THRIFT-1588 Java Generated Exceptions don't follow inheritance pattern as other 
Languages

- reduce NUM_QUERIES within test for slow machines ;-r

Modified:
    thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc   (contents, 
props changed)
    
thrift/trunk/lib/java/test/org/apache/thrift/server/TestNonblockingServer.java  
 (contents, props changed)

Modified: thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc
URL: 
http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc?rev=1332809&r1=1332808&r2=1332809&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc Tue May  1 
20:43:26 2012
@@ -355,6 +355,7 @@ string t_java_generator::java_type_impor
     "import org.apache.thrift.protocol.TTupleProtocol;\n" +
     "import org.apache.thrift.protocol.TProtocolException;\n" +
     "import org.apache.thrift.EncodingUtils;\n" +
+    "import org.apache.thrift.TException;\n" +
     "import java.util.List;\n" +
     "import java.util.ArrayList;\n" +
     "import java.util.Map;\n" +
@@ -1242,7 +1243,7 @@ void t_java_generator::generate_java_str
     (in_class ? "static " : "") << "class " << tstruct->get_name() << " ";
 
   if (is_exception) {
-    out << "extends Exception ";
+    out << "extends TException ";
   }
   out << "implements org.apache.thrift.TBase<" << tstruct->get_name() << ", " 
<< tstruct->get_name() << "._Fields>, java.io.Serializable, Cloneable";
 

Propchange: thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc
------------------------------------------------------------------------------
    svn:executable = *

Modified: 
thrift/trunk/lib/java/test/org/apache/thrift/server/TestNonblockingServer.java
URL: 
http://svn.apache.org/viewvc/thrift/trunk/lib/java/test/org/apache/thrift/server/TestNonblockingServer.java?rev=1332809&r1=1332808&r2=1332809&view=diff
==============================================================================
--- 
thrift/trunk/lib/java/test/org/apache/thrift/server/TestNonblockingServer.java 
(original)
+++ 
thrift/trunk/lib/java/test/org/apache/thrift/server/TestNonblockingServer.java 
Tue May  1 20:43:26 2012
@@ -36,7 +36,7 @@ public class TestNonblockingServer exten
 
   private Thread serverThread;
   private TServer server;
-  private static final int NUM_QUERIES = 10000;
+  private static final int NUM_QUERIES = 1000;
 
   protected TServer getServer(TProcessor processor, TNonblockingServerSocket 
socket, TProtocolFactory protoFactory, TTransportFactory factory) {
     final Args args = new 
Args(socket).processor(processor).protocolFactory(protoFactory);

Propchange: 
thrift/trunk/lib/java/test/org/apache/thrift/server/TestNonblockingServer.java
------------------------------------------------------------------------------
    svn:executable = *


Reply via email to