This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: java.rmi.server.UnicastRemoteObject interface
- From: Tom Tromey <tromey at redhat dot com>
- To: Dhek Bhun Kho <bhun at chello dot nl>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 03 Jan 2003 15:59:28 -0700
- Subject: Re: java.rmi.server.UnicastRemoteObject interface
- References: <1041628691.10618.2.camel@tasslehof.bhun.net>
- Reply-to: tromey at redhat dot com
>>>>> ">" == 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)
{