This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: java.rmi.server.UnicastRemoteObject interface


>>>>> ">" == Dhek Bhun Kho <bhun@chello.nl> writes:

>> The declared exceptions do not match the sun api spec's. It's
>> really minor on one hand, but a major problem on the other as it
>> breaks compiling existing code.

We treat divergences like this (for checked exceptions anyway) as
serious bugs.  Thanks for pointing this out.

>> <     throws RemoteException, NoSuchObjectException 
>> ---
>> >     throws NoSuchObjectException 

Please send unidiff (-u) patches and a complete ChangeLog entry.
See the contribution page:

    http://gcc.gnu.org/contribute.html

Also, in this case the patch didn't compile.  An additional change was
required.  New patch appended.  I'm checking this in on the trunk and
the 3.3 branch.  I also put it in Classpath.

Tom

Index: ChangeLog
from  Dhek Bhun Kho  <bhun@chello.nl>

	* gnu/java/rmi/server/UnicastServerRef.java (unexportObject):
	Don't throw RemoteException.
	* java/rmi/server/UnicastRemoteObject.java (unexportObject): Don't
	throw RemoteException.

Index: gnu/java/rmi/server/UnicastServerRef.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/rmi/server/UnicastServerRef.java,v
retrieving revision 1.4
diff -u -r1.4 UnicastServerRef.java
--- gnu/java/rmi/server/UnicastServerRef.java 31 Oct 2002 18:35:21 -0000 1.4
+++ gnu/java/rmi/server/UnicastServerRef.java 3 Jan 2003 22:38:13 -0000
@@ -1,5 +1,5 @@
 /*
-  Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
+  Copyright (c) 1996, 1997, 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -129,7 +129,7 @@
 }
 
 
-public boolean unexportObject(Remote obj, boolean force) throws RemoteException {
+public boolean unexportObject(Remote obj, boolean force) {
     // Remove all hashes of methods which may be called.
     buildMethodHash(obj.getClass(), false);
     return UnicastServer.unexportObject(this, force);
Index: java/rmi/server/UnicastRemoteObject.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/rmi/server/UnicastRemoteObject.java,v
retrieving revision 1.4
diff -u -r1.4 UnicastRemoteObject.java
--- java/rmi/server/UnicastRemoteObject.java 31 Oct 2002 18:35:23 -0000 1.4
+++ java/rmi/server/UnicastRemoteObject.java 3 Jan 2003 22:38:14 -0000
@@ -1,5 +1,5 @@
 /*
-  Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
+  Copyright (c) 1996, 1997, 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -113,7 +113,7 @@
   }
 
   public static boolean unexportObject(Remote obj, boolean force) 
-    throws RemoteException, NoSuchObjectException 
+    throws NoSuchObjectException 
   {
     if (obj instanceof RemoteObject)
       {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]