*/
package org.sonar.process;
+import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.text.StrSubstitutor;
throw new IllegalStateException("Could not read properties from file '" + args[0] + "'", e);
} finally {
IOUtils.closeQuietly(reader);
+ FileUtils.deleteQuietly(propertyFile);
}
return new Props(properties);
}
*/
package org.sonar.process;
-import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
private final Map<String, String> envProperties = new HashMap<String, String>();
private final Properties properties = new Properties();
private File workDir;
- private File propertiesFile;
private Process process;
private StreamGobbler errorGobbler;
private StreamGobbler outputGobbler;
waitUntilFinish(outputGobbler);
waitUntilFinish(errorGobbler);
ProcessUtils.closeStreams(process);
- FileUtils.deleteQuietly(propertiesFile);
}
}
}
private File buildPropertiesFile() {
+ File propertiesFile = null;
try {
propertiesFile = File.createTempFile("sq-conf", "properties");
Properties props = new Properties();