Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4322176

Repeated interface method declarations confuse RMI-IIOP compiler

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • other-libs
    • 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)
      ======================================================================

            sbauersunw Stefan Bauer (Inactive)
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: