avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r1180218 - in /avro/trunk: CHANGES.txt lang/java/ipc/src/main/java/org/apache/avro/ipc/specific/SpecificResponder.java
Date Fri, 07 Oct 2011 20:41:37 GMT
Author: cutting
Date: Fri Oct  7 20:41:37 2011
New Revision: 1180218

URL: http://svn.apache.org/viewvc?rev=1180218&view=rev
Log:
AVRO-914. Java: Fix SpecificResponder to better handle non-Exception Throwables.  Contributed
by philz.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/specific/SpecificResponder.java

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1180218&r1=1180217&r2=1180218&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Fri Oct  7 20:41:37 2011
@@ -132,6 +132,9 @@ Avro 1.6.0 (unreleased)
     AVRO-902. C++/CMake installs into /usr/local/local/.  (Nebojsa
     Sabovic via thiru)
 
+    AVRO-914. Java: Fix SpecificResponder to better handle
+    non-Exception Throwables. (philz via cutting)
+
 Avro 1.5.4 (12 September 2011)
 
   IMPROVEMENTS

Modified: avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/specific/SpecificResponder.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/specific/SpecificResponder.java?rev=1180218&r1=1180217&r2=1180218&view=diff
==============================================================================
--- avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/specific/SpecificResponder.java
(original)
+++ avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/specific/SpecificResponder.java
Fri Oct  7 20:41:37 2011
@@ -87,7 +87,11 @@ public class SpecificResponder extends G
       method.setAccessible(true);
       return method.invoke(impl, params);
     } catch (InvocationTargetException e) {
-      throw (Exception)e.getTargetException();
+      if (e.getTargetException() instanceof Exception) {
+        throw (Exception) e.getTargetException();
+      } else {
+        throw new Exception(e.getTargetException());
+      }
     } catch (NoSuchMethodException e) {
       throw new AvroRuntimeException(e);
     } catch (IllegalAccessException e) {



Mime
View raw message