JDK-6624555 : CanonicalizeJava2Registry may set CurrentVersion to random value
  • Type: Bug
  • Component: install
  • Sub-Component: install
  • Affected Version: 6u5
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2007-11-01
  • Updated: 2010-09-17
  • Resolved: 2008-01-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
6u10 b10Fixed 7Fixed
Code inspection of RegInstall.cpp led to the following observation:

In CanonicalizeJava2Registry, in the block "if (dwIndex > 0)", we have to recompute the szFamilyVersion string via wsprintf after the call to ParseVersionString. At that point, szFamilyVersion is pointing to a random version string of the potentially multiple installed JRE versions.

This bug might lead to the wrong Java version being used as the CurrentVersion during uninstallation if multiple versions are installed on the machine.

SUGGESTED FIX webrev: http://j2se.east/deployment/www/webrevs/qz198522/6ux/6624555/deploy/ testscase: none. I did not see any incorrect CurrentVersion setting when I tested the multiple jre installation and uninstallation which included 1.4, 1.5 and 6. But, during the code inspection, the possible cause for the issue was identified. The code improvement was made.

EVALUATION Will change the code to get the correct registry value.