Assert we are don't perform copy into itself
This commit is contained in:
@@ -162,11 +162,15 @@ public class KotlinRuntimeLibraryUtil {
|
|||||||
jarNotFoundHandler.run();
|
jarNotFoundHandler.run();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
VirtualFile runtimeJar = getLocalKotlinRuntimeJar(project);
|
VirtualFile runtimeJar = getLocalKotlinRuntimeJar(project);
|
||||||
assert runtimeJar != null;
|
assert runtimeJar != null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
FileUtil.copy(runtimePath, new File(runtimeJar.getPath()));
|
File libraryJarPath = new File(runtimeJar.getPath());
|
||||||
|
assert !FileUtil.filesEqual(runtimePath, libraryJarPath) : "Shouldn't be called for updating same file";
|
||||||
|
|
||||||
|
FileUtil.copy(runtimePath, libraryJarPath);
|
||||||
}
|
}
|
||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
throw new AssertionError(e);
|
throw new AssertionError(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user