Patch: RMI UnicastRemoteCall (libgcj/10886)

Jeff Sturm jsturm@one-point.com
Fri May 23 19:43:00 GMT 2003


The problem seems to appear when marshalling the return value of certain
void remote methods over the 1.1 wire protocol.  I don't know if this is
exactly the right thing to do, but it does solve the test case.

Jeff

2003-05-23  Jeff Sturm  <jsturm@one-point.com>

	PR libgcj/10886:
	* gnu/java/rmi/server/UnicastRemoteCall.java (returnValue):
	Test for empty vector.

Index: gnu/java/rmi/server/UnicastRemoteCall.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/rmi/server/UnicastRemoteCall.java,v
retrieving revision 1.4
diff -u -p -r1.4 UnicastRemoteCall.java
--- gnu/java/rmi/server/UnicastRemoteCall.java	7 Nov 2002 18:01:05 -0000	1.4
+++ gnu/java/rmi/server/UnicastRemoteCall.java	23 May 2003 19:35:26 -0000
@@ -213,7 +213,7 @@ public class UnicastRemoteCall

   Object returnValue()
   {
-    return vec.elementAt(0);
+    return (vec.size() > 0 ? vec.elementAt(0) : null);
   }

   Object[] getArguments()




More information about the Java-patches mailing list