[izpack-changes] r1812 - izpack-src/trunk/src/lib/com/izforge/izpack/panels

noreply at berlios.de noreply at berlios.de
Mon Apr 16 10:13:17 CEST 2007


Author: bartzkau
Date: 2007-04-16 10:13:16 +0200 (Mon, 16 Apr 2007)
New Revision: 1812

Modified:
   izpack-src/trunk/src/lib/com/izforge/izpack/panels/JDKPathPanel.java
Log:
Bug at dismiss usage of a JDK with a wrong version.


Modified: izpack-src/trunk/src/lib/com/izforge/izpack/panels/JDKPathPanel.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/panels/JDKPathPanel.java	2007-04-07 15:29:37 UTC (rev 1811)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/panels/JDKPathPanel.java	2007-04-16 08:13:16 UTC (rev 1812)
@@ -30,7 +30,6 @@
 
 import com.coi.tools.os.win.MSWinConstants;
 import com.coi.tools.os.win.NativeLibException;
-import com.coi.tools.os.win.RegDataContainer;
 import com.izforge.izpack.installer.InstallData;
 import com.izforge.izpack.installer.InstallerFrame;
 import com.izforge.izpack.util.AbstractUIHandler;
@@ -99,25 +98,25 @@
      */
     public boolean isValidated()
     {
-        if(idata.getVariable("PANEL_LAYOUT_TEST") != null)
-            return(true);
+        boolean retval = false;
         if (super.isValidated())
         {
             switch( verifyVersionEx())
             {
             case OK:
                 idata.setVariable(getVariableName(), pathSelectionPanel.getPath());
-                return (true);
+                retval = true;
+                break;
             case BAD_REG_PATH:
                 if (askQuestion(parent.langpack.getString("installer.warning"), parent.langpack.getString("JDKPathPanel.nonValidPathInReg"),
                         AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_NO) == AbstractUIHandler.ANSWER_YES)
                 {
                     idata.setVariable(getVariableName(), pathSelectionPanel.getPath());
-                    return (true);
+                    retval = true;
                 }
-                return(false);
+                break;
             case BAD_REAL_PATH:
-                return(false);
+                break;
             case BAD_VERSION:
                 String min = getMinVersion();
                 String max = getMaxVersion();
@@ -136,13 +135,14 @@
                         AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_NO) == AbstractUIHandler.ANSWER_YES)
                 {
                     idata.setVariable(getVariableName(), pathSelectionPanel.getPath());
-                    return (true);
+                    retval = true;
                 }
+                break;
                 default: throw new RuntimeException("Internal error: unknown result of version verification.");
                 
             }
         }
-        return (false);
+        return (retval);
     }
 
     /** Called when the panel becomes active. */




More information about the izpack-changes mailing list