aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-duplications/src/test/java/org/sonar/duplications/DuplicationsTestUtil.java
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-02-15 23:32:14 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-02-19 12:02:10 +0100
commit7cf57c2495bd16c2e7056c0ff47fc962a8ff432f (patch)
treea4a0124029e70fbcc45d00429da495d0058b7a49 /sonar-duplications/src/test/java/org/sonar/duplications/DuplicationsTestUtil.java
parent6658f59ae96921016438eeeab136a4eb4e5703af (diff)
downloadsonarqube-7cf57c2495bd16c2e7056c0ff47fc962a8ff432f.tar.gz
sonarqube-7cf57c2495bd16c2e7056c0ff47fc962a8ff432f.zip
SONAR-5700 New logging API to remove coupling on SLF4J
Diffstat (limited to 'sonar-duplications/src/test/java/org/sonar/duplications/DuplicationsTestUtil.java')
-rw-r--r--sonar-duplications/src/test/java/org/sonar/duplications/DuplicationsTestUtil.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/DuplicationsTestUtil.java b/sonar-duplications/src/test/java/org/sonar/duplications/DuplicationsTestUtil.java
index 8d9adaa5411..24e006078e7 100644
--- a/sonar-duplications/src/test/java/org/sonar/duplications/DuplicationsTestUtil.java
+++ b/sonar-duplications/src/test/java/org/sonar/duplications/DuplicationsTestUtil.java
@@ -23,10 +23,13 @@ import java.io.File;
public class DuplicationsTestUtil {
- private static final File fileDir = new File("src/test/files/");
-
public static File findFile(String relativePathToFile) {
- return new File(fileDir, relativePathToFile);
+ File file = new File("src/test/files/", relativePathToFile);
+ if (!file.exists()) {
+ // IntellijIDEA resolves path from root module basedir
+ file = new File("sonar-duplications/src/test/files/", relativePathToFile);
+ }
+ return file;
}
}