From 074a5b0e8a436b80208d5c86d2ebf9491befbc69 Mon Sep 17 00:00:00 2001 From: Mikhail Golubev Date: Fri, 12 Jul 2019 14:57:07 +0300 Subject: [PATCH] PY-34622 Remove inadvertent caching of SDK roots in VFS listener of changes under them GitOrigin-RevId: e88ef5d6f5e12fb94ecc39ce3cf35b1f4fb4403b --- python/src/com/jetbrains/python/packaging/PyPackageUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/src/com/jetbrains/python/packaging/PyPackageUtil.java b/python/src/com/jetbrains/python/packaging/PyPackageUtil.java index fb76e4e9c4be..393cf6803fce 100644 --- a/python/src/com/jetbrains/python/packaging/PyPackageUtil.java +++ b/python/src/com/jetbrains/python/packaging/PyPackageUtil.java @@ -521,11 +521,11 @@ public class PyPackageUtil { */ public static void runOnChangeUnderInterpreterPaths(@NotNull Sdk sdk, @NotNull Runnable runnable) { final Application app = ApplicationManager.getApplication(); - final VirtualFile[] roots = sdk.getRootProvider().getFiles(OrderRootType.CLASSES); VirtualFileManager.getInstance().addAsyncFileListener(new AsyncFileListener() { @Nullable @Override public ChangeApplier prepareChange(@NotNull List events) { + final VirtualFile[] roots = sdk.getRootProvider().getFiles(OrderRootType.CLASSES); allEvents: for (VFileEvent event : events) { // In case of create event getFile() returns null as the file hasn't been created yet