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

idltojava compiler does not translate IDL callbacks correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: other-libs
    • Labels:
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.5.1

      Description

      The idltojava compiler does not translate the following IDL code to Java correctly.

      module Test
      {
      interface Callback
      {
      boolean update() ;
      } ;

      interface Server
      {
      boolean registerCallback(in Callback monitor) ;
      } ;
      } ;

      The Java code produced for the Server implementation (_ServerImplBase.java) uses the following to implement the registerCallback() method:
                 case 0: // Test.Server.registerCallback
                        {
                            boolean __result = self.registerCallback(
                              (Test.Callback)o[0]);
                              n[0] = (__result) ? 1 : 0;
                        }
                         break;
      Parameter zero (o[0]) is not a Test.Callback object, hence the cast throws an exception. The exception is reported to the client as an Unknown exception number three.

        Attachments

          Activity

            People

            Assignee:
            duke J. Duke (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: