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

bug (com.sun.corba.se.spi.orb.DataCollectorBase) parsing in-parameters in ORB when setting up CORBA

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: other-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      We have found a Java SE bug in the class:

        com.sun.corba.se.spi.orb.DataCollectorBase

      We have used jdk 1.5.0_06 as base, but this bug stretches at least from
      JDK 1.4 to 1.6.

      --------

      When setting up the ORB in CORBA, possible in-parameters are parsed.

      The parser com.sun.corba.se.spi.orb.PropertyParser uses above mentioned
      DataCollectorBase.

      It stores the properties for CORBA in a HashSet (which has the internal
      structure HashMap).

      When parsing it looks at suffixes of the properties (a specified suffix,
      which correlates to the name of the command line parameter).

      The problem it that it has two name spaces for properties and some of
      them have the same suffix.

      What we have seen happen is that what is intended to be stored as:

         org.omg.CORBA.ORBServerId=<id>

      instead is stored as:

         com.sun.CORBA.POA.ORBServerId=<id>

      This depends on the order of the iterator in HashMap.

      So, when later setting the serverID, it doesn’t find it since it is not
      stored as org.omg.CORBA.ORBServerId.

      --------

      The way the parser works is that it iterates over the HashSet of CORBA
      properties and break when it has found a match on the suffix.

      It should (as I understand it) depend on the order in the list in
      com.sun.corba.se.impl.orb.ParserTable.

      ( This is documented in org.omg.CORBA.ORB )

      Therefore, I think a good change that adds determinism and also reflects
      the order in ParserTable is to change the current HashSet in the parser
      to LinkedHashSet.

      This Set preserves the order of how elements are inserted.

      See attached class file.

      --------

      If you want a test case to work with, where this can fail, I recommend
      the JCK test:

      javasoft.sqe.tests.api.org.omg.PortableInterceptor.ObjectReferenceTemplate.MethodsTests

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              clucasius Carlos Lucasius (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: