-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
beta2
-
x86, sparc
-
linux, solaris_2.6, windows_nt
-
Verified
Name: aaR10142 Date: 05/04/2001
The behavior of the javax.rmi.CORBA.Util.isLocal() and its javadoc was changed,
but I can't find an approved CCC request for this change.
So it is unapproved, and should be rolled back or CCC request should be provided.
javadoc 1.3 says:
"
public static boolean isLocal(Stub stub)
throws RemoteException
Returns true if the stub is in the same ORB instance as is the servant. This
method is equivalent to ObjectImpl._is_local() except that it throws a
RemoteException instead of a SystemException.
Parameters:
stub - the stub to test.
Returns:
true if local, false if not.
Throws:
RemoteException - if stub has not been connected to an ORB.
"
javadoc 1.4 says:
"
public static boolean isLocal(Stub stub)
throws RemoteException
May return true if the servant incarnating the object is
located in the same process as the stub and they both share
the same ORB instance. This method is equivalent to
ObjectImpl._is_local() except that it throws a RemoteException
instead of a SystemException.
Parameters:
stub - the stub to test.
Returns:
false
Throws:
RemoteException - if stub is not connected to an ORB.
"
The implementation was changed to always returns false
src/share/classes/com/sun/corba/se/internal/javax/rmi/CORBA/Util.java:
"
/**
* Returns true if the stub is in the same ORB instance as is the
* servant. This method is equivalent to <code>ObjectImpl._is_local()</code>
* except that it throws a RemoteException instead of a SystemException.
* @param stub the stub to test.
* @return true if local, false if not.
* @throws RemoteException if stub has not been connected to an ORB.
*/
public boolean isLocal(javax.rmi.CORBA.Stub stub) throws RemoteException {
try {
// NOTE: If this is enabled be sure to update the
// rmic.LocalStubTest.
//return stub._is_local();
return false;
!!!!!! ^^^^^^^^^^^^^^
} catch (SystemException e) {
throw javax.rmi.CORBA.Util.mapSystemException(e);
}
}
"
So the new specification is not correct in any case,
the method never throws RemoteException.
======================================================================
*******************************************************************************
###@###.### 2001-08-20
Fix Verified OK
- using javadocs at: /usr/local/java/jdk1.4/doc/api/javax/rmi/CORBA/Util.html#isLocal(javax.rmi.CORBA.Stub)
*******************************************************************************