-
-
Notifications
You must be signed in to change notification settings - Fork 23
Potential race condition in PluginTenantConfigurableConfigurationHandler #100
Copy link
Copy link
Open
Description
This code uses the double-checked lock pattern:
public C getConfigurable(@Nullable final UUID kbTenantId) {
if (kbTenantId != null && !this.configuredTenants.contains(kbTenantId)) {
synchronized(this.configuredTenants) {
if (!this.configuredTenants.contains(kbTenantId)) {
this.configure(kbTenantId);
this.configuredTenants.add(kbTenantId);
}
}
}
return (C)this.pluginTenantConfigurable.get(kbTenantId);
}However configuredTenants can potentially be modified by a different thread while contains is called out side the synchronization block. AFAIK, this is not thread safe.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels