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

Incorrect abstract interface semantics in JDK ValueHandler

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.2_08
    • 1.4.2_07
    • other-libs
    • b01
    • x86
    • other

        It turns out that the JDK 1.4.2 ValueHandler is incorrectly determining
        abstract interfaces in some circumstances, in the code of
        com.sun.corba.se.internal.io.ObjectStreamClassCorbaExt we have this:

             static final boolean isAbstractInterface(Class cl) {

                 Method[] method = ObjectStreamClassCorbaExt.getDeclaredMethods(cl);
                 // Test for abstractness (used under rmi/iiop when determining
        whether
                 // to call read/write_Abstract

                 if (!cl.isInterface()) {
                     return false;
                 }

                 if (method.length == 0) {
                     return false;
                 }

        However the Java to IDL spec (1.3.11) says:

        Java interfaces that do not extend java.rmi.Remote directly or indirectly
        and have no methods are also mapped to OMG IDL abstract interfaces. Hence
        the above code is wrong.

        This was discovered at a customer site who is having problems interoping
        between WebSphere and WLS.


        >>Let us know if you have a sample code to show this interop issue ?



        public interface Foo {};
        public class FooImpl implements Foo, Serializable {};
        public class SomeFoo implements Serializable {
                 private Foo my foo = new FooImpl();
        }

        public interface FooRemote implements Remote {
                 public void tryFoo(SomeFoo foo) throws RemoteException;
        }
        ###@###.### 2004-11-16 02:32:29 GMT

              minqi Yumin Qi
              cprasadsunw Ck Prasad (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: