From 49eace61c9e07e15335f6e0e3f396a6e7d5230c3 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 29 Sep 2015 14:44:32 +0200 Subject: [PATCH] don't report exception if trying to update jar to the same file (this can happen if the version of the plugin is different from the version of the runtime it bundles; in that case, we've already messed up and there is no value in spamming EA with exceptions) (EA-73451 - IAE: KotlinRuntimeLibraryUtil.replaceFile) --- .../kotlin/idea/versions/KotlinRuntimeLibraryUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/versions/KotlinRuntimeLibraryUtil.java b/idea/src/org/jetbrains/kotlin/idea/versions/KotlinRuntimeLibraryUtil.java index 25880f674b1..446fc910175 100644 --- a/idea/src/org/jetbrains/kotlin/idea/versions/KotlinRuntimeLibraryUtil.java +++ b/idea/src/org/jetbrains/kotlin/idea/versions/KotlinRuntimeLibraryUtil.java @@ -256,7 +256,7 @@ public class KotlinRuntimeLibraryUtil { File libraryJarPath = new File(localPath); if (FileUtil.filesEqual(updatedFile, libraryJarPath)) { - throw new IllegalArgumentException("Shouldn't be called for updating same file: " + updatedFile); + return; } FileUtil.copy(updatedFile, libraryJarPath);