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

Collided method and constant names are mapped incorrectly in OMG IDL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • other-libs
    • None
    • merlin
    • sparc
    • solaris_8
    • Not verified


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

      tuong.nguyen@eng 2000-09-28

      Spec. reference:
       
       OMG ptc/00-01-06 , section 1.3.2.8 , page 1-9

      Problem description:

       According to the OMG spec. that the Java method and constant names that are
       the same then the constant name should have the trailing underscore when it is
       mapped in OMG IDL. Unfortunately, the following output showed that the
       constant name did not have the trailing underscore in IDL file:


      (tuongn@bonnelle) [6:48pm] method01 [469] % cat Test1.java

      // OMG ptc/00-01-06 - 1.3.2.8 Method names that collide with other names

      import java.rmi.*;

      public interface Test1 extends Remote {
          static final int foo = 10;
          int foo() throws RemoteException;
      }
      (tuongn@bonnelle) [6:48pm] method01 [470] % /usr/local/java/jdk1.4/solaris/bin/javac Test1.java
      (tuongn@bonnelle) [6:49pm] method01 [471] % /usr/local/java/jdk1.4/solaris/bin/rmic -idl Test1
      (tuongn@bonnelle) [6:50pm] method01 [472] % cat Test1.idl
      /**
       * Test1.idl
       * Generated by rmic -idl. Do not edit
       * Thursday, September 28, 2000 6:50:22 PM PDT
       */

      #include "orb.idl"

      #ifndef __Test1__
      #define __Test1__



          interface Test1 {
          
              const long foo = 10;
              long foo( );
          
          };

      #pragma ID Test1 "RMI:Test1:0000000000000000"


      #endif

      (tuongn@bonnelle) [6:50pm] method01 [473] %
      ********************************************************************************

      ###@###.### 2001-08-14

      - Fix verified ok
        1) with build: j2sdk-1_4_0-beta_refresh-bin-b75-solsparc-09_aug_2001
        2) with test:
           tests/product/rmi-iiop/JavaToIdlMapping/Names/method01/Test1.java

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

            sbauersunw Stefan Bauer (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: