[izpack-changes] r1690 - izpack-src/trunk/src/lib/com/izforge/izpack/panels
noreply at berlios.de
noreply at berlios.de
Sun Jan 7 18:44:35 CET 2007
Author: jponge
Date: 2007-01-07 18:44:24 +0100 (Sun, 07 Jan 2007)
New Revision: 1690
Modified:
izpack-src/trunk/src/lib/com/izforge/izpack/panels/PathInputPanel.java
Log:
Fixes a NPE
Modified: izpack-src/trunk/src/lib/com/izforge/izpack/panels/PathInputPanel.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/panels/PathInputPanel.java 2007-01-07 17:24:01 UTC (rev 1689)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/panels/PathInputPanel.java 2007-01-07 17:44:24 UTC (rev 1690)
@@ -340,18 +340,21 @@
}
// now read the file, once we've identified which one to read
- InputStreamReader isr = new InputStreamReader(in);
- br = new BufferedReader(isr);
- String line;
- while ((line = br.readLine()) != null)
- {
- line = line.trim();
- // use the first non-blank line
- if (!"".equals(line)) break;
- }
- defaultInstallDir = line;
- VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables());
- defaultInstallDir = vs.substitute(defaultInstallDir, null);
+ if (in != null)
+ {
+ InputStreamReader isr = new InputStreamReader(in);
+ br = new BufferedReader(isr);
+ String line;
+ while ((line = br.readLine()) != null)
+ {
+ line = line.trim();
+ // use the first non-blank line
+ if (!"".equals(line)) break;
+ }
+ defaultInstallDir = line;
+ VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables());
+ defaultInstallDir = vs.substitute(defaultInstallDir, null);
+ }
}
catch (Exception e)
{
More information about the izpack-changes
mailing list