diff --git a/jps/jps-builders/src/org/jetbrains/jps/incremental/artifacts/ArtifactOutputToSourceMapping.java b/jps/jps-builders/src/org/jetbrains/jps/incremental/artifacts/ArtifactOutputToSourceMapping.java index 6c172251f0e1..572433552d65 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/incremental/artifacts/ArtifactOutputToSourceMapping.java +++ b/jps/jps-builders/src/org/jetbrains/jps/incremental/artifacts/ArtifactOutputToSourceMapping.java @@ -25,7 +25,6 @@ import org.jetbrains.jps.incremental.storage.AbstractStateStorage; import org.jetbrains.jps.incremental.storage.PathStringDescriptor; import java.io.*; -import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -41,25 +40,16 @@ public class ArtifactOutputToSourceMapping extends AbstractStateStorage state) throws IOException { - super.update(FileUtil.toSystemIndependentName(path), normalize(state)); + super.update(FileUtil.toSystemIndependentName(path), state); } @Override public void appendData(String path, List data) throws IOException { - super.appendData(FileUtil.toSystemIndependentName(path), normalize(data)); - } - - private static List normalize(List data) { - if (data.isEmpty()) return Collections.emptyList(); - List normalized = new ArrayList(data.size()); - for (SourcePathAndRootIndex pair : data) { - normalized.add(new SourcePathAndRootIndex(FileUtil.toSystemIndependentName(pair.getPath()), pair.getRootIndex())); - } - return normalized; + super.appendData(FileUtil.toSystemIndependentName(path), data); } public void appendData(String outputPath, int rootIndex, String sourcePath) throws IOException { - super.appendData(outputPath, Collections.singletonList(new SourcePathAndRootIndex(FileUtil.toSystemIndependentName(sourcePath), rootIndex))); + super.appendData(outputPath, Collections.singletonList(new SourcePathAndRootIndex(sourcePath, rootIndex))); } @Override @@ -77,8 +67,8 @@ public class ArtifactOutputToSourceMapping extends AbstractStateStorage