[coverage] IDEA-343451 Avoid calling NotNull method, as the implementation in plugins may return null

GitOrigin-RevId: b6eb4a0db276e2f2bcb626c1483facfb297b1d1a
This commit is contained in:
Maksim Zuev
2024-01-31 14:56:54 +01:00
committed by intellij-monorepo-bot
parent fc8d386102
commit cfda9bd3f1

View File

@@ -223,7 +223,7 @@ public abstract class BaseCoverageSuite implements CoverageSuite, JDOMExternaliz
@Override
public void writeExternal(final Element element) throws WriteExternalException {
String absolutePath = getCoverageDataFileName();
String absolutePath = myCoverageDataFileProvider.getCoverageDataFilePath();
String pathInSystemDir = FileUtil.getRelativePath(new File(PathManager.getSystemPath()), new File(absolutePath));
element.setAttribute(FILE_PATH, pathInSystemDir != null ? FileUtil.toSystemIndependentName(pathInSystemDir) : absolutePath);
element.setAttribute(NAME_ATTRIBUTE, myName);