From 7cf57c2495bd16c2e7056c0ff47fc962a8ff432f Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Sun, 15 Feb 2015 23:32:14 +0100 Subject: SONAR-5700 New logging API to remove coupling on SLF4J --- .../test/java/org/sonar/duplications/DuplicationsTestUtil.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sonar-duplications') 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; } } -- cgit v1.2.3