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

The Java Deployment Toolkit deployJava.versionCheck fails to detect 1.6.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 7-pool
    • 6u10
    • deploy

      FULL PRODUCT VERSION :
      1.6.0

      ADDITIONAL OS VERSION INFORMATION :
      Any OS.

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Any browser.

      A DESCRIPTION OF THE PROBLEM :
      If the user has the 1.6 (no revision) JRE installed, the Java Depoyment Toolkit returns TRUE for deployJava.versionCheck("1.6.0_n") where n is greater than 1, which is incorrect. This method of checking versions works when the user has a JRE with a revision version, but not if they have 1.6.0.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1.) Embed the java deployment toolkit in a web page via a normal <script type = "text/javascript" src = "deployJava.js"></script>

      2.) Navigate to this web page with only JRE 1.6.0 installed.

      3.) Call deployJava.versionCheck("1.6.0_10"), and display the value somehow.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The expected result is "false".
      ACTUAL -
      The actual result is "true".

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      <html>
      <head>
      <script type = "text/javascript" src = "deployJava.js"></script>
      <script type = "text/javascript">
      alert(deployJava.versionCheck("1.6.0_10"));
      </script>
      </head>
      <body>
      </body>
      </html>
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Add the following to detection:

      if( deployjava.getJREs().length == 1 && deployJava.getJREs()[0] == "1.6.0" ) return false;

            vrao Vivek Rao (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: