aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src/main
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-08-07 12:57:49 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-08-07 12:57:49 +0200
commit3f3be78148cf9fd49bccdae844e4bdb93a6e23b5 (patch)
treea664844205db9f802195b791d896f4912861c4c4 /sonar-application/src/main
parent020bb4c00c7ec0a9ead90c8132c277900da5e4ca (diff)
downloadsonarqube-3f3be78148cf9fd49bccdae844e4bdb93a6e23b5.tar.gz
sonarqube-3f3be78148cf9fd49bccdae844e4bdb93a6e23b5.zip
SONAR-5519 create temp directory if not exists at startup
Diffstat (limited to 'sonar-application/src/main')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/PropsBuilder.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/PropsBuilder.java b/sonar-application/src/main/java/org/sonar/application/PropsBuilder.java
index af1d9817eb2..82fe49d181f 100644
--- a/sonar-application/src/main/java/org/sonar/application/PropsBuilder.java
+++ b/sonar-application/src/main/java/org/sonar/application/PropsBuilder.java
@@ -101,8 +101,7 @@ class PropsBuilder {
private void initExistingDir(Props props, String propKey, String defaultRelativePath) throws IOException {
File dir = configureDir(props, propKey, defaultRelativePath);
if (!dir.exists()) {
- throw new IllegalStateException(String.format("Property '%s' is not valid, directory does not exist: %s",
- propKey, dir.getAbsolutePath()));
+ FileUtils.forceMkdir(dir);
}
if (!dir.isDirectory()) {
throw new IllegalStateException(String.format("Property '%s' is not valid, not a directory: %s",