浏览代码

Improve thread safety (#12395) (#12417)

See: https://vaadin.com/forum/thread/17522264/concurrentmodificationexception-in-vaadin-shared-on-karaf-4-2-x

Co-authored-by: Tatu Lund <tatu@vaadin.com>
tags/8.14.1
Olli Tietäväinen 2 年前
父节点
当前提交
2b2028e22f
没有帐户链接到提交者的电子邮件

+ 5
- 3
shared/src/main/java/com/vaadin/osgi/resources/impl/VaadinResourceTrackerComponent.java 查看文件

@@ -151,9 +151,11 @@ public class VaadinResourceTrackerComponent {
*/
@Activate
protected void activate(BundleContext context) {
vaadinSharedContext = context;
for (Delegate<?> registration : resourceToRegistration.values()) {
registration.register(vaadinSharedContext, vaadinService);
synchronized (resourceToRegistration) {
vaadinSharedContext = context;
for (Delegate<?> registration : resourceToRegistration.values()) {
registration.register(context, vaadinService);
}
}
}


正在加载...
取消
保存