From 981beb2dab821985070d61d445e6e562c6b8b88c Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Tue, 7 Jul 2015 13:57:02 +0300 Subject: [PATCH] lock free findChildById --- .../openapi/vfs/newvfs/impl/VirtualDirectoryImpl.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/VirtualDirectoryImpl.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/VirtualDirectoryImpl.java index a49df7b86027..54c0cbd784a7 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/VirtualDirectoryImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/VirtualDirectoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -394,10 +394,8 @@ public class VirtualDirectoryImpl extends VirtualFileSystemEntry { } public VirtualFileSystemEntry findChildById(int id, boolean cachedOnly) { - synchronized (myData) { - if (ArrayUtil.indexOf(myData.myChildrenIds, id) >= 0) { - return VfsData.getFileById(id, this); - } + if (ArrayUtil.indexOf(myData.myChildrenIds, id) >= 0) { + return VfsData.getFileById(id, this); } if (cachedOnly) return null;