[java-rt] FileComparisonFailure: dump incorrect file path

GitOrigin-RevId: 788594ddfae494a55a94d845daadcbad51f9dde5
This commit is contained in:
Tagir Valeev
2024-02-02 14:35:46 +01:00
committed by intellij-monorepo-bot
parent d1a3122faa
commit d1a8762c10

View File

@@ -27,7 +27,10 @@ public class FileComparisonFailure extends ComparisonFailure implements FileComp
myExpected = expected;
myActual = actual;
myFilePath = expectedFilePath;
if (expectedFilePath != null && !new File(expectedFilePath).isFile()) throw new NullPointerException("'expectedFilePath' should point to the existing file or be null");
if (expectedFilePath != null && !new File(expectedFilePath).isFile()) {
throw new NullPointerException("'expectedFilePath' should point to the existing file or be null; got: "
+ expectedFilePath);
}
myActualFilePath = actualFilePath;
}