From 32cc383e7a8ff6e51b4f9f19c268f81d8131efdf Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Wed, 10 Sep 2014 02:47:25 +0200 Subject: [PATCH] =?UTF-8?q?ability=20to=20get=20mock=20fs=20root=20?= =?UTF-8?q?=E2=80=94=20findFileByPath("")=20must=20returns=20root?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/intellij/mock/MockVirtualFileSystem.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/testFramework/src/com/intellij/mock/MockVirtualFileSystem.java b/platform/testFramework/src/com/intellij/mock/MockVirtualFileSystem.java index 8550f973a8ea..73b8cfeaf267 100644 --- a/platform/testFramework/src/com/intellij/mock/MockVirtualFileSystem.java +++ b/platform/testFramework/src/com/intellij/mock/MockVirtualFileSystem.java @@ -36,9 +36,8 @@ public class MockVirtualFileSystem extends DeprecatedVirtualFileSystem { path = path.replace(File.separatorChar, '/'); path = path.replace('/', ':'); if (StringUtil.startsWithChar(path, ':')) path = path.substring(1); - String[] components = path.split(":"); MyVirtualFile file = myRoot; - for (String component : components) { + for (String component : StringUtil.split(path, ":")) { file = file.getOrCreate(component); } return file;