From 36fef199604fbca96c2ac951eb0e3472f4dfb966 Mon Sep 17 00:00:00 2001 From: Egor Ushakov Date: Wed, 31 Oct 2018 12:02:11 +0300 Subject: [PATCH] IDEA-201455 Less calls to File.isDirectory in CoreLocalVirtualFile - no need for atomicity, see IDEA-CR-38926 --- .../com/intellij/openapi/vfs/local/CoreLocalVirtualFile.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/core-impl/src/com/intellij/openapi/vfs/local/CoreLocalVirtualFile.java b/platform/core-impl/src/com/intellij/openapi/vfs/local/CoreLocalVirtualFile.java index c18e7cdde3a0..829c93b51660 100644 --- a/platform/core-impl/src/com/intellij/openapi/vfs/local/CoreLocalVirtualFile.java +++ b/platform/core-impl/src/com/intellij/openapi/vfs/local/CoreLocalVirtualFile.java @@ -1,7 +1,6 @@ // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.openapi.vfs.local; -import com.intellij.openapi.util.AtomicNotNullLazyValue; import com.intellij.openapi.util.NotNullLazyValue; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vfs.VfsUtilCore; @@ -23,7 +22,7 @@ public class CoreLocalVirtualFile extends VirtualFile { public CoreLocalVirtualFile(@NotNull CoreLocalFileSystem fileSystem, @NotNull File ioFile) { myFileSystem = fileSystem; myIoFile = ioFile; - myIsDirectory = AtomicNotNullLazyValue.createValue(myIoFile::isDirectory); + myIsDirectory = NotNullLazyValue.createValue(myIoFile::isDirectory); } public CoreLocalVirtualFile(@NotNull CoreLocalFileSystem fileSystem, @NotNull File ioFile, boolean isDirectory) {