]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9802 Decrease coupling of sonar-process with commons-io
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 14 Sep 2017 16:27:23 +0000 (18:27 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 26 Sep 2017 21:49:37 +0000 (23:49 +0200)
(without dropping the dependency)

server/sonar-process/src/main/java/org/sonar/process/AesCipher.java
server/sonar-process/src/main/java/org/sonar/process/ConfigurationUtils.java

index 8be45aa47dc3bbb547827d0f5d7be7c8aab52723..88169291e0b675769117269c0803d9a63b4d9456 100644 (file)
@@ -126,7 +126,7 @@ final class AesCipher implements Cipher {
 
   String getPathToSecretKey() {
     if (StringUtils.isBlank(pathToSecretKey)) {
-      pathToSecretKey = new File(FileUtils.getUserDirectoryPath(), ".sonar/sonar-secret.txt").getPath();
+      pathToSecretKey = new File(System.getProperty("user.home"), ".sonar/sonar-secret.txt").getPath();
     }
     return pathToSecretKey;
   }
index 577f07fa8fe26298da88b175816d69c8ab32284c..660621d40e75f336ff64ea4620714a4df1d93783 100644 (file)
@@ -30,7 +30,7 @@ import java.util.Properties;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.text.StrSubstitutor;
 
-import static org.apache.commons.io.FileUtils.deleteQuietly;
+import static org.sonar.process.FileUtils2.deleteQuietly;
 
 public final class ConfigurationUtils {