From 943bb1e280fdd6eb958850afee427074a3c160c9 Mon Sep 17 00:00:00 2001 From: Col-E Date: Mon, 25 Sep 2023 08:38:48 -0400 Subject: [PATCH] Synchronize remote classloader property updating, as this is accessed across multiple threads --- .../info/properties/builtin/RemoteClassloaderProperty.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recaf-core/src/main/java/software/coley/recaf/info/properties/builtin/RemoteClassloaderProperty.java b/recaf-core/src/main/java/software/coley/recaf/info/properties/builtin/RemoteClassloaderProperty.java index a8868e637..c0f567a6a 100644 --- a/recaf-core/src/main/java/software/coley/recaf/info/properties/builtin/RemoteClassloaderProperty.java +++ b/recaf-core/src/main/java/software/coley/recaf/info/properties/builtin/RemoteClassloaderProperty.java @@ -45,7 +45,7 @@ public static Integer get(@Nonnull JvmClassInfo classInfo) { * Loader ID associated with the class, * used as key for {@link WorkspaceRemoteVmResource#getJvmClassloaderBundles()}. */ - public static void set(@Nonnull JvmClassInfo classInfo, int loaderId) { + public static synchronized void set(@Nonnull JvmClassInfo classInfo, int loaderId) { classInfo.setProperty(cache.computeIfAbsent(loaderId, RemoteClassloaderProperty::new)); }