mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-117852 NullPointerException when making project with mixed java/groovy sources
This commit is contained in:
+8
-2
@@ -328,12 +328,18 @@ public class GroovyBuilder extends ModuleLevelBuilder {
|
||||
GroovycOSProcessHandler.OutputItem item,
|
||||
Map<ModuleBuildTarget, String> generationOutputs,
|
||||
String compilerOutput,
|
||||
ModuleBuildTarget srcTarget) throws IOException {
|
||||
@NotNull ModuleBuildTarget srcTarget) throws IOException {
|
||||
if (chunk.getModules().size() > 1 && !srcTarget.equals(chunk.representativeTarget())) {
|
||||
File output = new File(item.outputPath);
|
||||
|
||||
String srcTargetOutput = generationOutputs.get(srcTarget);
|
||||
if (srcTargetOutput == null) {
|
||||
LOG.info("No output for " + srcTarget + "; outputs=" + generationOutputs + "; targets = " + chunk.getTargets());
|
||||
return item.outputPath;
|
||||
}
|
||||
|
||||
//todo honor package prefixes
|
||||
File correctRoot = new File(generationOutputs.get(srcTarget));
|
||||
File correctRoot = new File(srcTargetOutput);
|
||||
File correctOutput = new File(correctRoot, FileUtil.getRelativePath(new File(compilerOutput), output));
|
||||
|
||||
FileUtil.rename(output, correctOutput);
|
||||
|
||||
Reference in New Issue
Block a user