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

SetOverrideType and DynamicImplementation are not OMG spec compliant

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • fcs1
    • other-libs
    • None
    • beta
    • unknown
    • solaris_2.6
    • Not verified


      harold.carr@Eng 2000-09-08

      The following org.omg APIs are not in compliance with OMG specifications.

      -------------------------

      The existing

      org.omg.CORBA.SetOverrideType from_int(int i)

      specifies that it

      throws org.omg.CORBA.BAD_PARAM

      However, the OMG specification

      ptc/00-01-08 section 1.7 page 17

      does not have a throws clause for this method. The throws clause
      should be removed to bring it into specification compliance.

      org.omg.CORBA.SetOverrideType from_int must change from:

          public static SetOverrideType from_int(int i) throws org.omg.CORBA.BAD_PARAM
          {
      ....
          }

      to

          public static SetOverrideType from_int(int i)
          {
      ....
          }

      to bring it into compliance with OMG specification
      ptc/00-01-08 section 1.7 page 17


      -------------------------

      org.omg.CORBA.DynamicImplementation

      has been deprecated by

      ptc/00-01-08 section 1.20.2.2 page 94

      To bring it into specification compliance the following actions must
      be taken:

      * It should have a deprecated tag added to both the class and its only
        method (invoke).

      * "abstract" should be removed from both the class and the method.

      * The invoke method should throw new org.omg.CORBA.NO_IMPLEMENT().
        This is an unchecked exception. The method signature should NOT change
        to declare this exception.

      Note: this abstract class has been replaced by
      org.omg.PortableServer.DynamicImplementation.java
      which has a correct definition in the rip-int code base.


      org.omg.CORBA.DynamicImplementation must change from:

      /**
       * The base class for all object implementations using the DSI.
       * It defines a single abstract method,
       * <code>invoke</code>, that a dynamic servant needs to implement.
       * DynamicImplementation has been deprecated by the OMG in favor of
       * the Portable Object Adapter.
       *
       * @version 1.6, 09/09/97
       * @see org.omg.CORBA.ServerRequest
       * @since JDK1.2
       */

      public abstract
          class DynamicImplementation extends org.omg.CORBA.portable.ObjectImpl {

      /**
      * Accepts a <code>ServerRequest</code> object and uses its methods to
      * determine the request target, operation, and parameters, and to
      * set the result or exception.
      * Deprecated by the Portable Object Adapter.
      *
      * @param request a <code>ServerRequest</code> object representing
      * the request to be invoked
      *
      */

      public abstract void invoke(ServerRequest request);
          }

      to:

      /**
       * @deprecated org.omg.CORBA.DynamicImplementation
       */

      public class DynamicImplementation extends org.omg.CORBA.portable.ObjectImpl {

          /**
            * @deprecated Deprecated by Portable Object Adapter
            */

          public void invoke(ServerRequest request) {
      throw new org.omg.CORBA.NO_IMPLEMENT();
          }
      }

      To bring it into compliance with OMG specification
      ptc/00-01-08 section 1.20.2.2 page 94


      ********************************************************************************
      ###@###.### 2001-12-07

      Fixed Verified OK

      With Build:
      j2sdk-1_4_0-rc-bin-b89-solsparc-06_dec_2001

      With Test:
      /java/idl/ws/rip/RIP_TEST_MASTER/tests/api/orb/setoverridetype/SetOverrideTypeTest.java

      By code inspection:
      /java/re/jdk/1.4.0/promoted/latest/ws/j2se/src/share/classes/org/omg/CORBA/DynamicImplementation.java
      ********************************************************************************

            hcarr Harold Carr
            hcarr Harold Carr
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: