[izpack-devel] search input field without choices

Oliver Kiddle okiddle at yahoo.co.uk
Thu Jan 12 10:28:04 CET 2006


If I use a search field in a UserInputPanel but don't include any
<choice> elements, the installer crashes with a
java.lang.reflect.InvocationTargetException on startup. Not using
<choice> elements is useful where I just want a file picker. The
following patch fixes the crash.

Oliver

--- IzPack/src/lib/com/izforge/izpack/panels/UserInputPanel.java	2006-01-06 22:09:38.000000000 +0100
+++ IzPack.modified/src/lib/com/izforge/izpack/panels/UserInputPanel.java	2006-01-12 10:23:17.000000000 +0100
@@ -2621,6 +2621,11 @@
              * Check if the user has entered data into the ComboBox and add it to the Itemlist
              */
             String selected = (String) this.pathComboBox.getSelectedItem();
+            if (selected == null)
+            {
+                return false;
+            }
+            
             boolean found = false;
             for (int x = 0; x < this.pathComboBox.getItemCount(); x++)
             {


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.



More information about the izpack-devel mailing list