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

JNLP Specification: Version Selection Not Well Defined

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 9
    • Component/s: deploy
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b72
    • CPU:
      x86
    • OS:
      windows_xp

      Backports

        Description

        A DESCRIPTION OF THE PROBLEM :
        The version ordering described in Appendix A of the JNLP specification is non-transitive. It states that two elements are compared numerically if they can both be parsed as Java ints. Otherwise they are compared lexographically by ASCII value.

        For example, this definition implies that 4 > 2A, 2A > 12, and 12 > 4, which forms a cycle.

        This non-transitivity causes other parts of the spec to not be well defined. For example, the last sentence in section A.4 states the client should choose the resource with the highest version-id matching a given range. For a non-transitive relationship, "highest" is not well defined (what would be the highest in the above example?)

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Either the ordering should be made transitive, or behavior that refers to the "highest" or "lowest" version should be redefined or at least clarified.

        Two sections that refer to the "highest" version are 6.3.1 (fourth paragraph) and A.4 (first paragraph).
        ACTUAL -
        Section A (second-to-last paragraph):
        Each element in a tuple is treated as either a numeric or alphanumeric. Two elements are compared numerically if they can both be parsed as Java ints, otherwise they are compared lexicographically according to the ASCII value15 of the individual characters.

        Section 6.3.1 (fourth paragraph)
        The current-version-id must always be exact. If several versions of a given resource are in the cache, then the highest version-id that is lower than the requested version should be used. The Web server is not required to return an incremental update, but could just return the requested JAR file.

        Section A.4 (first paragraph)
        If two or more available resources match the given version-string, the JNLP Client should use the one matching the earlier version-range in the version-string. If two or more available resources match a given version-range, the JNLP Client should use the one with the highest version-id.

        URL OF FAULTY DOCUMENTATION :
        http://java.sun.com/products/javawebstart/download-spec.html

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  herrick Andy Herrick
                  Reporter:
                  tyao Ting-Yun Ingrid Yao (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: