File (@Nullable File moduleOutput, ResourceRootConfiguration config, @Nullable String outputDirectory) { if(outputDirectory != null) { moduleOutput = JpsPathUtil.urlToFile(outputDirectory); } if (moduleOutput == null) { return null; } String targetPath = config.targetPath; if (StringUtil.isEmptyOrSpaces(targetPath)) { return moduleOutput; } final File targetPathFile = new File(targetPath); final File outputFile = targetPathFile.isAbsolute() ? targetPathFile : new File(moduleOutput, targetPath); return new File(FileUtil.toCanonicalPath(outputFile.getPath())); }