-
Bug
-
Resolution: Fixed
-
P4
-
1.3.0
-
merlin
-
generic
-
generic
Name: skT45625 Date: 03/15/2000
java version "1.3.0rc1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-T)
Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)
Consider the following example code (file Test.java):
import java.rmi.*;
interface Super extends Remote{
void doSomething() throws RemoteException;
}
interface Sub1 extends Super{
void doSomething() throws RemoteException;
}
interface Sub2 extends Sub1{ }
public class Test implements Sub2{
public void doSomething() throws RemoteException {}
}
The method doSomething() is declared in Sub1, despite it already being inherited
from Super. This may seem unnecessary, but it can be appropriate if the
specification of the method in the documentation comment is different in Sub1.
Compile Test.java with command: javac Test.java
Compiles OK.
Compile RMI-IIOP stubs with command: rmic -iiop Test
error: interface Sub2 is not a valid remote interface: inherited interfaces Sub2
and Sub1 both declare method void doSomething () throws
java.rmi.RemoteException;.
Note that RMI-JRMP stubs compile OK with command: rmic Test
And if Test implements Sub1 instead, which is effectively the same as Sub2, then
RMI-IIOP stubs compile OK.
(Review ID: 101323)
======================================================================
- duplicates
-
JDK-4393673 Inherited remote interfaces not recognized by rmic
-
- Closed
-