revert compiler-message to receive only one file
[idea/community.git] / jps / jps-builders / src / org / jetbrains / jps / incremental / instrumentation / BaseInstrumentingBuilder.java
index fffa64cb6ccbb5903a8c0bb48e3d1708efada2df..f8c46abf3e5711c7a94b354ae34094a468a87db4 100644 (file)
@@ -20,6 +20,7 @@ import com.intellij.compiler.instrumentation.InstrumentationClassFinder;
 import com.intellij.compiler.instrumentation.InstrumenterClassWriter;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.util.Key;
+import com.intellij.util.containers.ContainerUtil;
 import org.jetbrains.annotations.Nullable;
 import org.jetbrains.jps.ModuleChunk;
 import org.jetbrains.jps.incremental.*;
@@ -72,7 +73,7 @@ public abstract class BaseInstrumentingBuilder extends ClassProcessingBuilder {
         LOG.info(e);
         final String message = e.getMessage();
         if (message != null) {
-          context.processMessage(new CompilerMessage(getPresentableName(), message, compiledClass.getSourceFilesPaths(), BuildMessage.Kind.ERROR));
+          context.processMessage(new CompilerMessage(getPresentableName(), BuildMessage.Kind.ERROR, message, ContainerUtil.getFirstItem(compiledClass.getSourceFilesPaths())));
         }
         else {
           context.processMessage(new CompilerMessage(getPresentableName(), e));