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

Obj.decodeReference does not correctly decode a multi-valued Reference

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.3.1
    • 1.3.0, 1.3.0_01
    • core-libs
    • None
    • ladybird
    • generic, sparc
    • generic, solaris_8

        Overview:
        ---------

        Obj.decodeReference cannot decode a JNDI Reference when the multi-valued attribute, javaReferenceAddress is returned unordered.

        Details:
        --------

        A single-valued JNDI Reference is defined as:

        javaReferenceAddress: #posn#StringRefAddr#addr# or #posn#BinaryRefAddr##addr

        And a multi-valued Referernce stored as:

        javaReferenceAddress: #0#type##Addr#, #1#type##Addr#, #2#type##Addr#

        If, for instance the javaReferenceAddress attribute is retrieved and then returned in the following order ...

        javaReferenceAddress: #2#type##Addr#, #1#type##Addr#, #0#type##Addr#

        The LDAP provider then attempts to rebuild a Reference object. The 'posn' component of the first address is used as the index-position to insert the decoded address into the Vector of RefAddr addresses maintained in the Reference object.

        The Vector object maintained in the Reference object is not given a specified size - it defaults to size 0. A RefAddr address added to the Vector with a index-position greater the size of the Vector will subsequently throw an ArrayIndexOutOfBoundsException.

        A fix is required that allows for unordered (or any order) multiple values of javaReferernceAddress to be correctly decoded and to ensure that the resulting Reference object maintains the correct address order.

              jbrucesunw Jonathan Bruce (Inactive)
              jbrucesunw Jonathan Bruce (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: