From 01cd6a25e7baeee08cd79bbb14443bbda6e12b25 Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Thu, 13 Jan 2022 10:28:51 +0700 Subject: [PATCH] [stream-debugger] Use PathUtil.getLocalPath GitOrigin-RevId: ca73d640969460f7438b15fb854280b1df18d836 --- .../debugger/streams/exec/LibraryTraceExecutionTestCase.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/stream-debugger/test/com/intellij/debugger/streams/exec/LibraryTraceExecutionTestCase.kt b/plugins/stream-debugger/test/com/intellij/debugger/streams/exec/LibraryTraceExecutionTestCase.kt index 75d46f315cbf..084dff4af847 100644 --- a/plugins/stream-debugger/test/com/intellij/debugger/streams/exec/LibraryTraceExecutionTestCase.kt +++ b/plugins/stream-debugger/test/com/intellij/debugger/streams/exec/LibraryTraceExecutionTestCase.kt @@ -10,7 +10,7 @@ import com.intellij.openapi.util.SystemInfo import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.text.StringUtil import com.intellij.testFramework.fixtures.MavenDependencyUtil -import junit.framework.TestCase +import com.intellij.util.PathUtil import java.io.File /** @@ -32,9 +32,7 @@ abstract class LibraryTraceExecutionTestCase(private val coordinates: String) : ModuleRootModificationUtil.updateModel(myModule) { model -> MavenDependencyUtil.addFromMaven(model, coordinates) val libraryJar = model.moduleLibraryTable.getLibraryByName(coordinates)!!.rootProvider.getFiles(OrderRootType.CLASSES)[0] - val jarPathWithSuffix = libraryJar.path - TestCase.assertTrue(jarPathWithSuffix.endsWith("!/")) - jarPath = jarPathWithSuffix.substring(0, jarPathWithSuffix.length - "!/".length) + jarPath = PathUtil.getLocalPath(libraryJar)!! } }