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

IDL interface SendingContext::CodeBase appears in com.sun package

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.1
    • Component/s: other-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      01
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description



        Name: skT45625 Date: 10/16/2000


        java version "1.3.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
        Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)


        the IDL interface SendingContext::CodeBase (defined in the OMG Objects-by-Value
        spec) has code generated into the package com.sun.org.omg. The org.omg sub
        package is fine but the top level packages(s) com.sun break portability. These
        stubs should not appear in these packages.

        The problem is compounded when an object that implements this interface is
        passed as the last parameter to the readValue method of the
        javax.rmi.CORBA.ValueHandler:

        Serializable readValue(org.omg.CORBA.portable.InputStream, int, Class,
        org.omg.SendingContext.RunTime)

        The RunTime interface is the 'super class' of the CodeBase interface so it
        should be perfectly valid to pass CodeBase object into this method. However. if
        we generate our own stubs for codebase (in the correct package) i.e. object
        implements the interface:
        org.omg.SendingContext.CodeBase

        a ClassCastException is thrown from the implementation if readValue. If we use
        the stubs from the rt.jar (in package com.sun) then everything works ok. I
        expect that a java language cast is being used instead of using a narrow method
        as is correct when dealing with IDL objects (CodeBaseHelper.narrow).

        This is a serious problem as it inhibits our ability to support JDKs from other
        vendors. This problem also appears in JDK 1.3 for Solaris - haven't checked NT.
        (Review ID: 110810)
        ======================================================================
        *******************************************************************************
        ###@###.### 2001-07-30

        - Code inspection ok for com/sun/corba/se/internal/io/ValueHandlerImpl.java
        - Build: j2sdk-1_4_0-beta_refresh-bin-b73-solsparc-25_jul_2001
        and (1.3.1_01 source at)
        /net/nightsvr.eng/export4/integration/1.3.1/j2se/src/share/classes/com/sun/corba/se/internal/io/ValueHandlerImpl.java

        ********************************************************************************

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                eandersosunw Everett Anderson (Inactive)
                Reporter:
                skondamasunw Suresh Kondamareddy (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: