From 5a206da97b43149cc9f8db13dd406d22aef75d66 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 14 Sep 2017 18:27:23 +0200 Subject: [PATCH] SONAR-9802 Decrease coupling of sonar-process with commons-io (without dropping the dependency) --- .../src/main/java/org/sonar/process/AesCipher.java | 2 +- .../src/main/java/org/sonar/process/ConfigurationUtils.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/sonar-process/src/main/java/org/sonar/process/AesCipher.java b/server/sonar-process/src/main/java/org/sonar/process/AesCipher.java index 8be45aa47dc..88169291e0b 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/AesCipher.java +++ b/server/sonar-process/src/main/java/org/sonar/process/AesCipher.java @@ -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; } diff --git a/server/sonar-process/src/main/java/org/sonar/process/ConfigurationUtils.java b/server/sonar-process/src/main/java/org/sonar/process/ConfigurationUtils.java index 577f07fa8fe..660621d40e7 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/ConfigurationUtils.java +++ b/server/sonar-process/src/main/java/org/sonar/process/ConfigurationUtils.java @@ -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 { -- 2.39.5