mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ensure absolute URI for source files
This commit is contained in:
@@ -580,7 +580,7 @@ public class JavaBuilder extends Builder{
|
||||
final String srcPath;
|
||||
final JavaFileObject source = diagnostic.getSource();
|
||||
if (source != null) {
|
||||
srcPath = FileUtil.toSystemIndependentName(new File(source.toUri()).getPath());
|
||||
srcPath = FileUtil.toSystemIndependentName(source.toUri().getPath());
|
||||
}
|
||||
else {
|
||||
srcPath = null;
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.jetbrains.jps.incremental.java;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jps.incremental.Paths;
|
||||
|
||||
import javax.tools.*;
|
||||
import java.io.File;
|
||||
@@ -111,7 +112,7 @@ class JavacFileManager extends ForwardingJavaFileManager<StandardJavaFileManager
|
||||
}
|
||||
}
|
||||
}
|
||||
final File file = (dir == null? new File(fileName) : new File(dir, fileName));
|
||||
final File file = (dir == null? new File(fileName).getAbsoluteFile() : new File(dir, fileName));
|
||||
return new OutputFileObject(myContext, file, kind, className, src);
|
||||
}
|
||||
|
||||
@@ -119,7 +120,7 @@ class JavacFileManager extends ForwardingJavaFileManager<StandardJavaFileManager
|
||||
if (loc == StandardLocation.CLASS_OUTPUT) {
|
||||
if (myOutputsMap.size() > 1 && sourceFile != null) {
|
||||
// multiple outputs case
|
||||
final File outputDir = findOutputDir(new File(sourceFile.toUri()));
|
||||
final File outputDir = findOutputDir(new File(Paths.toURI(sourceFile.toUri().getPath())));
|
||||
if (outputDir != null) {
|
||||
return outputDir;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user