United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7069603 refactor unregister deploy in regfx.cpp
JDK-7069603 : refactor unregister deploy in regfx.cpp

Details
Type:
Bug
Submit Date:
2011-07-22
Status:
Closed
Updated Date:
2011-10-13
Project Name:
JDK
Resolved Date:
2011-10-13
Component:
deploy
OS:
windows
Sub-Component:
deployment_toolkit
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7-client
Fixed Versions:
7u2 (b08)

Related Reports
Backport:

Sub Tasks

Description
when fixing 7068626 - it's noticed that we should refactor unregisgterDeploy in regfx.cpp:

I'd suggest to structure code differently like:
    if (checkIfOurBinariesAreRegisteredFroDeploy()) {
        doRegularUninstall()
        if (hadShadowedJRE()) {
            reregisterShadowedJRE();
        }
    }

For reregister logic we can refactor registerDeploy() to extract function that will register everything given
root directory. Then we can use it for reregister and registerDeploy() to avoid replicating the code
to reconstruct registry keys?

                                    

Comments
EVALUATION

I still think refactoring may be helpful (not blocker though) as we will need to update this code once we resolve
problemwith upgrading DT when installing from DT. Then we may have registry pointing into JRE for deployJava1.dll, etc.
and they also need to be corrected. So, soon it will be more tan 2 keys and we will need to keep them in sync.
                                     
2011-07-22
EVALUATION

1) remove/clean some dead code
2) right now we create/remove HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\JavaFX\2.0.0 key in registerDeploy/unregisgterDeploy; should be done in FX installer instead.
( http://javafx-jira.kenai.com/browse/RT-16934 - will work on that tomorrow for FX 2.0.2)

test: manual test to make sure fxreg -register/unregister works
                                     
2011-09-14
SUGGESTED FIX

http://sa.us.oracle.com/projects/deployment_data/7u2/7069603.0
                                     
2011-09-14



Hardware and Software, Engineered to Work Together