HADOOP-7843. compilation failing because workDir not initialized in RunJar.java (John George via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1204629 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mahadev Konar 2011-11-21 18:15:44 +00:00
parent d984245304
commit 3539156dea
2 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,9 @@ Release 0.23.1 - Unreleased
HADOOP-6614. RunJar should provide more diags when it can't create HADOOP-6614. RunJar should provide more diags when it can't create
a temp file. (Jonathan Hsieh via eli) a temp file. (Jonathan Hsieh via eli)
HADOOP-7843. compilation failing because workDir not initialized in
RunJar.java (John George via mahadev)
Release 0.23.0 - 2011-11-01 Release 0.23.0 - 2011-11-01
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -149,7 +149,7 @@ public class RunJar {
File tmpDir = new File(new Configuration().get("hadoop.tmp.dir")); File tmpDir = new File(new Configuration().get("hadoop.tmp.dir"));
ensureDirectory(tmpDir); ensureDirectory(tmpDir);
File workDir; final File workDir;
try { try {
workDir = File.createTempFile("hadoop-unjar", "", tmpDir); workDir = File.createTempFile("hadoop-unjar", "", tmpDir);
} catch (IOException ioe) { } catch (IOException ioe) {
@ -158,6 +158,7 @@ public class RunJar {
System.err.println("Error creating temp dir in " + tmpDir + " due to " System.err.println("Error creating temp dir in " + tmpDir + " due to "
+ ioe.getMessage()); + ioe.getMessage());
System.exit(-1); System.exit(-1);
return;
} }
if (!workDir.delete()) { if (!workDir.delete()) {